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

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

#682 in WebAssembly

Download history 2003/week @ 2024-07-29 1200/week @ 2024-08-05 1030/week @ 2024-08-12 1826/week @ 2024-08-19 1253/week @ 2024-08-26 1267/week @ 2024-09-02 1341/week @ 2024-09-09 1715/week @ 2024-09-16 2584/week @ 2024-09-23 2827/week @ 2024-09-30 2827/week @ 2024-10-07 2285/week @ 2024-10-14 5924/week @ 2024-10-21 6037/week @ 2024-10-28 4068/week @ 2024-11-04 2314/week @ 2024-11-11

18,408 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
~863K SLoC