Record

interface-binding

One interface instance the workload matched on this plugin — e.g. the store interface of acme:kv@0.1.0, labeled cache, with its manifest config.

record interface-binding {
  namespace: string,
  package: string,
  interfaces: list​<string>,
  version: option​<version>,
  name: option​<string>,
  external-id: option​<string>,
  config: list​<tuple​<string, string>>,
}

Fields

NameTypeDescription
namespacestring

Interface namespace (e.g. acme).

packagestring

Package within the namespace (e.g. kv).

interfaceslist​<string>

The matched interface names within the package (e.g. store).

versionoption​<version>

Version of the instance, if one was requested.

nameoption​<string>

Instance label when the workload names multiple instances of the same namespace:package, if any. Component-facing: what the component calls this import.

For a wasm host component plugin, a label routes here when the operator declares it under the plugin's host.plugins entry's bindings. The workload names it on an entry and the component imports the interface under that (implements ..) label; the name then reaches this hook with the binding's resolved config, and every call the label routes as wasmcloud:host/identity#get-binding-name. An import matching no entry of its shape — a label no entry names, or a plain import where every entry is named — fails the bind rather than binding unnamed.

Declare nothing and the plugin serves plain imports as before, and a workload naming more than one binding of a package is refused. Two unnamed entries of one namespace:package are one binding, for any plugin; give them labels.

external-idoption​<string>

Platform-facing id the binding was declared with, if any — what the platform's configuration calls the same instance.

Two names, one contract: name above and external-id here are the two names an instance can carry, and both refer to the one interface contract described by the rest of this record. An external-id is not an identity — it carries no uniqueness requirement, and a binding may declare either name, both, or neither.

configlist​<tuple​<string, string>>

Interface-level configuration from the workload manifest, as key/value pairs sorted by key.