stateapi

package
v0.0.0-...-147f0cf Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 27, 2023 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const DeleteMethod = "delete"

DeleteMethod deletes a record from the store

View Source
const GetMethod = "get"

GetMethod reads a record from the store

View Source
const GetMultipleMethod = "getMultiple"

GetMultipleMethod reads multiple records from the store

View Source
const ServiceName = "state"

ServiceName defines the default state service agent ID

View Source
const SetMethod = "set"

SetMethod writes a record to the store

View Source
const SetMultipleMethod = "setMultiple"

SetMultipleMethod writes multiple records to the store

View Source
const StorageCap = "store"

StorageCap identifies the capability to store state

Variables

This section is empty.

Functions

This section is empty.

Types

type DeleteArgs

type DeleteArgs struct {
	Key string `json:"key"`
}

type GetArgs

type GetArgs struct {
	Key string `json:"key"`
}

type GetMultipleArgs

type GetMultipleArgs struct {
	Keys []string `json:"keys"`
}

type GetMultipleResp

type GetMultipleResp struct {
	// Key-values that were found
	KV map[string][]byte `json:"kv"`
}

type GetResp

type GetResp struct {
	// The returned key or "" if record wasnt found
	Key string `json:"key"`
	// Flag, the record was found (true)
	Found bool `json:"found"`
	// Data, the raw data of the record
	Value []byte `json:"value"`
}

type SetArgs

type SetArgs struct {
	Key   string `json:"key"`
	Value []byte `json:"value"`
}

type SetMultipleArgs

type SetMultipleArgs struct {
	KV map[string][]byte `json:"kv"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL