The lattice control interface is a smithy-defined interface contract that is expected to be consumed in one of two different ways:
wasmcloud:latticecontrol
contract
The following is a list of implementations of the wasmcloud:latticecontrol
contract. Feel free to submit a PR adding your implementation if you have a community/open source version.
| Name | Vendor | Description | | :--- | :---: | :--- | | Lattice Controller | wasmCloud | Implementation using the wasmcloud-control-interface crate.
Start 250 instances of the echo actor actor on a host ```rust use wasmbusrpc::actor::prelude::{Context, RpcResult}; use wasmcloudinterfacelatticecontrol::{ CtlOperationAck, LatticeController, LatticeControllerSender, StartActorCommand, }; use wasmcloudinterfacelogging::debug;
async fn startactor(ctx: &Context) -> RpcResult
debug!(
"Starting {} instance(s) of actor {} on host {}",
cmd.count, cmd.actor_ref, cmd.host_id
);
lattice.start_actor(ctx, &cmd).await
}
```
Get all hosts in a lattice ```rust use wasmbusrpc::actor::prelude::{Context, RpcResult}; use wasmcloudinterfacelatticecontrol::{Host, LatticeController, LatticeControllerSender}; use wasmcloudinterfacelogging::info;
async fn gethosts(ctx: &Context) -> RpcResult
info!("There are {} hosts in this lattice", hosts.len());
Ok(hosts)
} ```