Class Manifest
The manifest is a description of your plugin and some of the runtime constraints to apply to it. You can think of it as a blueprint to build your plugin.
public class Manifest
- Inheritance
-
Manifest
- Inherited Members
Constructors
Manifest()
Create an empty manifest.
public Manifest()
Manifest(params WasmSource[])
Create a manifest from one or more Wasm sources.
public Manifest(params WasmSource[] sources)
Parameters
sources
WasmSource[]
Properties
AllowedHosts
List of host names the plugins can access. Example:
AllowedHosts = new List<string> {
"www.example.com",
"api.*.com",
"example.*",
}
[JsonPropertyName("allowed_hosts")]
public IList<string> AllowedHosts { get; set; }
Property Value
AllowedPaths
List of directories that can be accessed by the plugins. Examples:
AllowedPaths = new Dictionary<string, string>
{
{ "/usr/plugins/1/data", "/data" }, // src, dest
{ "d:/plugins/1/data", "/data" } // src, dest
};
[JsonPropertyName("allowed_paths")]
public IDictionary<string, string> AllowedPaths { get; set; }
Property Value
Config
Configurations available to the plugins. Examples:
Config = new Dictionary<string, string>
{
{ "userId", "55" }, // key, value
{ "mySecret", "super-secret-key" } // key, value
};
[JsonPropertyName("config")]
public IDictionary<string, string> Config { get; set; }
Property Value
MemoryOptions
Configures memory for the Wasm runtime. Memory is described in units of pages (64KB) and represent contiguous chunks of addressable memory.
[JsonPropertyName("memory")]
public MemoryOptions? MemoryOptions { get; set; }
Property Value
Sources
List of Wasm sources. See PathWasmSource and ByteArrayWasmSource.
[JsonPropertyName("wasm")]
public IList<WasmSource> Sources { get; set; }
Property Value
Timeout
Plugin call timeout.
[JsonPropertyName("timeout_ms")]
[JsonConverter(typeof(TimeSpanMillisecondsConverter))]
public TimeSpan? Timeout { get; set; }