fsm

package
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KeyValue

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

func NewKeyValue

func NewKeyValue() *KeyValue

func (*KeyValue) Apply

func (f *KeyValue) Apply(l *raft.Log) interface{}

func (*KeyValue) Get

func (f *KeyValue) Get(key string) (string, error)

func (*KeyValue) Restore

func (f *KeyValue) Restore(r io.ReadCloser) error

func (*KeyValue) Snapshot

func (f *KeyValue) Snapshot() (raft.FSMSnapshot, error)

type KeyValueOperation

type KeyValueOperation struct {
	Key       string `json:"key"`
	Value     string `json:"value"`
	Operation string `json:"operation"`
}

type KeyValueSnapshot

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

func (*KeyValueSnapshot) Persist

func (s *KeyValueSnapshot) Persist(sink raft.SnapshotSink) error

func (*KeyValueSnapshot) Release

func (s *KeyValueSnapshot) Release()

Jump to

Keyboard shortcuts

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