Key:Value Datastore
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.
Get
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.
Interface Details
Namespace | Capability | Function | Input | Output |
---|---|---|---|---|
|
|
|
|
|
Example JSON
This callback uses JSON messages as input and output to facilitate communications between WASM functions and the Tarmac host.
KVStoreGet
KVStoreGetResponse
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.
Set
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.
Interface Details
Namespace | Capability | Function | Input | Output |
---|---|---|---|---|
|
|
|
|
|
Example JSON
This callback uses JSON messages as input and output to facilitate communications between WASM functions and the Tarmac host.
KVStoreSet
KVStoreSetResponse
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.
Delete
The Delete function provides users with the ability to delete data stored within the Key:Value datastore.
Interface Details
Namespace | Capability | Function | Input | Output |
---|---|---|---|---|
|
|
|
|
|
Example JSON
This callback uses JSON messages as input and output to facilitate communications between WASM functions and the Tarmac host.
KVStoreDelete
KVStoreDeleteResponse
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.
Keys
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.
Interface Details
Namespace | Capability | Function | Input | Output |
---|---|---|---|---|
|
|
|
|
|
Example JSON
This callback uses JSON messages as input and output to facilitate communications between WASM functions and the Tarmac host.
KVStoreKeysResponse
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.
Last updated