crates.io 

wasmCloud Lattice Control Interface

The lattice control interface is a smithy-defined interface contract that outlines the operations and data structures supported by a capability provider supporting the wasmcloud:latticecontrol contract.

Capability Provider Implementations

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 | First party implementation of the lattice controller provider

Example Usage (🦀 Rust)

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 { let lattice = LatticeControllerSender::new(); let cmd = StartActorCommand { latticeid: "default".tostring(), actorref: "wasmcloud.azurecr.io/echo:0.3.4".tostring(), annotations: None, count: 250, hostid: "NB67YNOVU5YB3526RUNCKNZBCQDH2L5NZJKQ6FWOVWGSHNHHEO65RP4A".to_string(), };

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> { let lattice = LatticeControllerSender::new(); let hosts = lattice.gethosts(ctx, GetHostsRequest { latticeid: "default".tostring() }).await?;

info!("There are {} hosts in this lattice", hosts.len());
Ok(hosts)

} ```