Skip to main content

Crate warpgate

Crate warpgate 

Source

Re-exports§

pub use warpgate_api as api;

Modules§

host
test_utils

Structs§

FileLocator
A file system locator.
GitHubLocator
A GitHub release locator.
HttpClient
An HTTP(S) client with middleware that wraps reqwest::Client.
HttpDownloader
A downloader that uses our internal HTTP(S) client.
HttpOptions
Configures the HTTP(S) client used for making requests.
Id
A compact string identifier for use within records, key lookups, and more. Supports unicode alphanumeric characters, forward slash /, period ., underscore _, and dash -. A leading @ is supported to support npm package names.
IdError
ID errors.
NetrcMiddleware
OciClient
An OCI client that wraps oci_client::Client.
PluginContainer
A container around Extism’s Plugin and Manifest types that provides convenience methods for calling and caching functions from the WASM plugin. It also provides additional methods for easily working with WASI and virtual paths.
PluginLoader
A system for loading plugins from a locator strategy, and caching the plugin file (.wasm) to the host’s file system.
PluginManifest
The Manifest type is used to configure the runtime and specify how to load modules.
RegistryConfig
Configures an individual plugin registry.
RegistryLocator
An OCI registry locator.
UrlLocator
A HTTPS URL locator.

Enums§

PluginLocator
Strategies and protocols for locating plugins.
PluginLocatorError
Errors during plugin locator parsing.
VirtualPath
A container for WASI virtual paths that can also keep a reference to the original real path.
WarpgateHttpClientError
HTTP(S) client errors.
WarpgateLoaderError
Loader errors.
WarpgatePluginError
Plugin/runtime errors.
Wasm
The Wasm type specifies how to access a WebAssembly module

Constants§

WASM_LAYER_MEDIA_TYPE_JSON
WASM_LAYER_MEDIA_TYPE_TOML
WASM_LAYER_MEDIA_TYPE_WASM
WASM_LAYER_MEDIA_TYPE_YAML

Functions§

create_cache_key
Create a SHA256 hash key based on the provided value and seed.
create_http_client
Create an HTTP(S) client that’ll be used for downloading files.
create_http_client_with_options
Create an HTTP(S) client with the provided options, that’ll be used for downloading files.
determine_cache_extension
Determine the extension to use for a cache file, based on our list of supported extensions.
download_from_url_to_file
Download a file from the provided URL, with the provided HTTP(S) client, and save it to a destination location.
from_virtual_path
Convert the provided virtual guest path to an absolute host path.
inject_default_manifest_config
Inject our default configuration into the provided plugin manifest. This will set plugin_id and host_environment for use within PDKs.
move_or_unpack_download
If the temporary file is an archive, unpack it into the destination, otherwise more the file into the destination.
sort_virtual_paths
Sort virtual paths from longest to shortest host path, so that prefix replacing is deterministic and accurate.
to_virtual_path
Convert the provided absolute host path to a virtual guest path suitable for WASI sandboxed runtimes.

Type Aliases§

OfflineChecker
OnCallFn