#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

#841 in WebAssembly

Download history 1357/week @ 2024-08-23 1235/week @ 2024-08-30 1162/week @ 2024-09-06 1877/week @ 2024-09-13 2100/week @ 2024-09-20 2785/week @ 2024-09-27 2859/week @ 2024-10-04 2516/week @ 2024-10-11 4711/week @ 2024-10-18 6724/week @ 2024-10-25 3552/week @ 2024-11-01 3143/week @ 2024-11-08 4948/week @ 2024-11-15 4464/week @ 2024-11-22 5868/week @ 2024-11-29 4293/week @ 2024-12-06

19,944 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

~34–49MB
~875K SLoC