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§
pub use client::Client;
pub use client::ClientBuilder;
Modules§
- client
- Control interface client
Structs§
- Component
Auction Ack - A host response to a request to start a component.
- Component
Auction AckBuilder - Component
Auction Request - A request to locate suitable hosts for a given component
- Component
Auction Request Builder - Component
Description - A summary description of an component within a host inventory
- Component
Description Builder - Component
Instance - Component
Instance Builder - CtlResponse
- A control interface response that wraps a response payload, a success flag, and a message with additional context if necessary.
- Delete
Interface Link Definition Request - A request to remove a link definition and detach the relevant component from the given provider
- Delete
Interface Link Definition Request Builder - Host
- A summary representation of a host
- Host
Builder - Host
Inventory - Describes the known contents of a given host at the time of a query. Also used as a payload for the host heartbeat
- Host
Inventory Builder - Host
Label - A label on a given host (ex. “arch=amd64”)
- Host
Label Identifier - An identifier that represents a label on a given host (ex. “arch” in “arch=amd64”)
- Link
- A link definition between a source and target component (component or provider) on a given interface.
- Link
Builder - Builder that produces
Link
s - Provider
Auction Ack - A host response to a request to start a provider.
- Provider
Auction AckBuilder - Provider
Auction Request - A request to locate a suitable host for a capability provider.
- Provider
Auction Request Builder - Provider
Description - A summary description of a capability provider within a host inventory
- Provider
Description Builder - Builds
ProviderDescription
s - Registry
Credential - Credentials for a registry that contains WebAssembly component artifacts.
- Scale
Component Command - Command a host to scale a component
- Scale
Component Command Builder - Builder that produces
ScaleComponentCommand
s - Start
Provider Command - A command sent to a host requesting a capability provider be started with the given link name and optional configuration.
- Start
Provider Command Builder - A builder that produces
StartProviderCommand
s - Stop
Host Command - A command sent to request that the given host purge and stop
- Stop
Host Command Builder - Stop
Provider Command - A request to stop the given provider on the indicated host
- Stop
Provider Command Builder - Builder for
StopProviderCommand
s - Update
Component Command - 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
- Update
Component Command Builder - Builder for
UpdateComponentCommand
s