This crate provides an interface for actors to use to communicate with a key-value
store capability provider. Actors using this interface must have the wasmcloud:keyvalue
capability
permission.
This crate is one-way, and only supports actors making calls to the host. The capability provider does not deliver messages to actors (e.g. actors cannot subscribe to store change events).
The following is an example usage:
```rust
extern crate serdejson; extern crate wasmcloudactorhttpserver as http; extern crate wasmcloudactorkeyvalue as kv; extern crate wasmcloudactorcore as actor;
use http::{self, Request, Response}; use wascap_guest::HandlerResult;
extern crate serde_json;
pub fn init() { http::Handlers::registerhandlerequest(increment_counter); }
fn incrementcounter(msg: Request) -> HandlerResult
let result = json!({"counter": resp.value });
Ok(Response::json(result, 200, "OK")?)
} ```