map-nats-kv
A nats-kv provider for wasmcloud written in go, supports CRUD and listKeys
Building
Prerequisites:
- Go toolchain
- wit-bindgen-wrpc 0.7.0, download the release binary
- wash
go generate ./...
go build .
Alternatively, you can generate, build and package this provider in one step:
wash build
You can build the included test component with wash build -p ./component
.
Running to test
Prerequisites:
- Go toolchain
- nats-server
- nats-cli
Running as an application
You can deploy this provider, along with a component for testing, by deploying the wadm.yaml application. Make sure to build the component with wash build
.
# Build the component
cd component
wash build
# Return to the provider directory
cd ..
# Launch wasmCloud in the background
wash up -d
# Deploy the application
wash app deploy ./wadm.yaml
TODO:
Add support for kv watch, wit is there but not implemented