Crate wasmcloud_control_interface

source ·
Expand description

§Control Interface Client

This library provides a client API for consuming the wasmCloud control interface over a NATS connection. This library can be used by multiple types of tools, and is also used by the control interface capability provider and the wash CLI

§Usage

All of the Client functions are handled by a wasmCloud host running in the specified lattice. Each function returns a Result<CtlResponse<T>> wrapper around the actual response type. The outer result should be handled for protocol (timeouts, no hosts available) and deserialization errors (invalid response payload). The inner result is the actual response from the host(s) and should be handled for application-level errors.

Re-exports§

Modules§

  • Control interface client

Structs§

  • A host response to a request to start an component, confirming the host has enough capacity to start the component
  • A request to locate suitable hosts for a given component
  • A summary description of an component within a host inventory
  • A control interface response that wraps a response payload, a success flag, and a message with additional context if necessary.
  • A request to remove a link definition and detach the relevant component from the given provider
  • A summary representation of a host
  • Describes the known contents of a given host at the time of a query. Also used as a payload for the host heartbeat
  • A label on a given host (ex. “arch=amd64”)
  • A link definition between a source and target component (actor or provider) on a given interface. An InterfaceLinkDefinition connects one component’s import to another component’s export, specifying the configuration each component needs in order to execute the request, and represents an operator’s intent to allow the source to invoke the target.
  • A host response to a request to start a provider, confirming the host has enough capacity to start the provider and that the provider is not already running on the host
  • A request to locate a suitable host for a capability provider. The provider’s unique identity is used to rule out hosts on which the provider is already running.
  • A summary description of a capability provider within a host inventory
  • Credentials for a registry that contains artifacts from which WebAssembly components can be extracted (usually a docker image registry)
  • A command sent to a host requesting a capability provider be started with the given link name and optional configuration.
  • A command sent to request that the given host purge and stop
  • A request to stop the given provider on the indicated host
  • A command instructing a specific host to perform a live update on the indicated component by supplying a new image reference. Note that live updates are only possible through image references

Type Aliases§

  • Identifier of a component which sends invocations on the lattice
  • The name of a known (possibly pre-created) configuration, normally used when creating new interface links in order to configure one or both source/target
  • Identifier of one or more entities on the lattice used for addressing. May take many forms, such as:
  • Name of a link on the wasmCloud lattice
  • WIT interface for a given operation (ex. readwrite in wasi:keyvalue/readwrite.get)
  • WIT namespace for a given operation (ex. wasi in wasi:keyvalue/readwrite.get)
  • WIT package for a given operation (ex. keyvalue in wasi:keyvalue/readwrite.get)