#wasmcloud #control #ctl #control-api #message-broker #api-bindings

wasmcloud-control-interface

A client library for communicating with hosts on a wasmCloud lattice

55 releases (3 stable)

2.2.0 Oct 4, 2024
2.0.0 Sep 28, 2024
1.0.0 Apr 17, 2024
1.0.0-alpha.1 Mar 18, 2024
0.2.1 Mar 26, 2021

#804 in WebAssembly

Download history 1781/week @ 2024-08-17 1213/week @ 2024-08-24 1339/week @ 2024-08-31 1129/week @ 2024-09-07 1862/week @ 2024-09-14 2186/week @ 2024-09-21 3142/week @ 2024-09-28 2647/week @ 2024-10-05 2494/week @ 2024-10-12 5535/week @ 2024-10-19 6284/week @ 2024-10-26 3517/week @ 2024-11-02 2932/week @ 2024-11-09 5629/week @ 2024-11-16 4074/week @ 2024-11-23 5601/week @ 2024-11-30

18,983 downloads per month
Used in 8 crates (7 directly)

Apache-2.0

205KB
4.5K SLoC

Crates.io Documentation Rustdocs

wasmCloud Control Interface Client

This library is a convenient API for interacting with the lattice control interface. This is a Rust crate that implements the lattice control protocol as described in the wasmCloud reference documentation.

The lattice control interface provides a way for clients to interact with the lattice to issue control commands and queries. This interface is a message broker protocol that supports functionality like starting and stopping components and providers, declaring link definitions, monitoring lattice events, holding auctions to determine scheduling compatibility, and more.


lib.rs:

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.

Dependencies

~33–48MB
~867K SLoC