statemachine

package
v0.0.0-...-8e51596 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LastAppliedKey = "kvdbLastApplied"
)

Variables

View Source
var SupportOps map[string]struct{} = map[string]struct{}{"set": {}, "del": {}}

Functions

This section is empty.

Types

type Cmd

type Cmd struct {
	Op    string `json:"op" binding:"required"`
	Key   string `json:"key"`
	Value string `json:"value"`
}

type IKVDB

type IKVDB interface {
	Set(key, value string) error
	Get(key string) (string, error)
	Delete(key string) error
	Call(command []byte) error
	CommandCheck(command []byte) bool
}

func NewKVDB

func NewKVDB() (IKVDB, error)

type KVDB

type KVDB struct {
	// contains filtered or unexported fields
}

func (*KVDB) Call

func (k *KVDB) Call(command []byte) error

func (*KVDB) CommandCheck

func (k *KVDB) CommandCheck(command []byte) bool

func (*KVDB) Delete

func (k *KVDB) Delete(key string) error

func (*KVDB) Get

func (k *KVDB) Get(key string) (string, error)

func (*KVDB) Set

func (k *KVDB) Set(key, value string) error

Jump to

Keyboard shortcuts

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