package
Version:
v0.0.0-...-5849f30
Opens a new window with list of versions in this module.
Published: Mar 10, 2021
License: MIT
Opens a new window with license information.
Imports: 4
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
type Config struct {
Type string `json:"type"`
KVConfig KVConfig `json:"kvConfig,omitempty"`
}
Config defines the configuration for a state
Counter is a simple in memory counter
Close closes the counter (does nothing)
Increment increments the counter
Init initialises the counter
Window returns the current value and resets the counter
type KVConfig struct {
DbFileName string `json:"dbFileName"`
BucketName string `json:"bucketName"`
}
KVConfig defines the configuration of a KeyValue store
KVStore provides a persistent KeyValue store
Close closes the KeyValue Store ensuring it is persisted to disk
Delete deletes the given key
ForEach executes the function for each key/value pair
Get retrieves the specified value
Init initialises the KeyValue store
Set sets a Key to the defined value
type State interface {
Init() error
Close()
}
State is the interface for stateful storage backings for a rule
Create creates the stateful backing
Source Files
¶
Click to show internal directories.
Click to hide internal directories.