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§

pub use client::Client;
pub use client::ClientBuilder;

Modules§

client
Control interface client

Structs§

ComponentAuctionAck
A host response to a request to start a component.
ComponentAuctionAckBuilder
ComponentAuctionRequest
A request to locate suitable hosts for a given component
ComponentAuctionRequestBuilder
ComponentDescription
A summary description of an component within a host inventory
ComponentDescriptionBuilder
ComponentInstance
ComponentInstanceBuilder
CtlResponse
A control interface response that wraps a response payload, a success flag, and a message with additional context if necessary.
DeleteInterfaceLinkDefinitionRequest
A request to remove a link definition and detach the relevant component from the given provider
DeleteInterfaceLinkDefinitionRequestBuilder
Host
A summary representation of a host
HostBuilder
HostInventory
Describes the known contents of a given host at the time of a query. Also used as a payload for the host heartbeat
HostInventoryBuilder
HostLabel
A label on a given host (ex. “arch=amd64”)
HostLabelIdentifier
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.
LinkBuilder
Builder that produces Links
ProviderAuctionAck
A host response to a request to start a provider.
ProviderAuctionAckBuilder
ProviderAuctionRequest
A request to locate a suitable host for a capability provider.
ProviderAuctionRequestBuilder
ProviderDescription
A summary description of a capability provider within a host inventory
ProviderDescriptionBuilder
Builds ProviderDescriptions
RegistryCredential
Credentials for a registry that contains WebAssembly component artifacts.
ScaleComponentCommand
Command a host to scale a component
ScaleComponentCommandBuilder
Builder that produces ScaleComponentCommands
StartProviderCommand
A command sent to a host requesting a capability provider be started with the given link name and optional configuration.
StartProviderCommandBuilder
A builder that produces StartProviderCommands
StopHostCommand
A command sent to request that the given host purge and stop
StopHostCommandBuilder
StopProviderCommand
A request to stop the given provider on the indicated host
StopProviderCommandBuilder
Builder for StopProviderCommands
UpdateComponentCommand
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
UpdateComponentCommandBuilder
Builder for UpdateComponentCommands