Store and Retrieve data from a Key:Value datastore
The Key:Value Store capability provides WASM function developers the ability to store and retrieve data from Key:Value datastores. At the moment, Tarmac supports multiple Key:Value stores which can be enabled/disabled in the host configuration settings.
The Get function provides users with the ability to fetch data using the specified key. To avoid conflicts, the data
key within the response, JSON, will be base64 encoded.
Namespace | Capability | Function | Input | Output |
---|---|---|---|---|
This callback uses JSON messages as input and output to facilitate communications between WASM functions and the Tarmac host.
The Status structure within the response JSON denotes the success of the database call. The status code value follows the HTTP status code standards, with anything higher than 399 is an error.
The Set function provides users with the ability to store data within the Key:Value datastore. The data
key within the request JSON must be base64 encoded.
This callback uses JSON messages as input and output to facilitate communications between WASM functions and the Tarmac host.
The Status structure within the response JSON denotes the success of the database call. The status code value follows the HTTP status code standards, with anything higher than 399 is an error.
The Delete function provides users with the ability to delete data stored within the Key:Value datastore.
This callback uses JSON messages as input and output to facilitate communications between WASM functions and the Tarmac host.
The Status structure within the response JSON denotes the success of the database call. The status code value follows the HTTP status code standards, with anything higher than 399 is an error.
The Keys function provides users with the ability to fetch a list of all keys available within the Key:Value datastore.
Note: This callback requires no input JSON. However, the callback function will require users to provide a byte slice.
This callback uses JSON messages as input and output to facilitate communications between WASM functions and the Tarmac host.
The Status structure within the response JSON denotes the success of the database call. The status code value follows the HTTP status code standards, with anything higher than 399 is an error.
Namespace | Capability | Function | Input | Output |
---|---|---|---|---|
Namespace | Capability | Function | Input | Output |
---|---|---|---|---|
Namespace | Capability | Function | Input | Output |
---|---|---|---|---|
tarmac
kvstore
get
KVStoreGet
KVStoreGetResponse
tarmac
kvstore
set
KVStoreSet
KVStoreSetResponse
tarmac
kvstore
delete
KVStoreDelete
KVStoreDeleteResponse
tarmac
kvstore
keys
EmptyByteSlice
KVStoreKeysResponse