store

package
v0.0.0-...-eedf899 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Data

type Data map[string]string

func NewData

func NewData() *Data

func (Data) Persist

func (data Data) Persist(w io.Writer) error

func (Data) Restore

func (data Data) Restore(r io.ReadCloser) error

func (Data) Set

func (data Data) Set(key string, val string)

type FSM

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

func NewFSM

func NewFSM(data *Data, logger hclog.Logger) *FSM

func (*FSM) Apply

func (f *FSM) Apply(log *raft.Log) any

func (*FSM) Restore

func (f *FSM) Restore(snapshot io.ReadCloser) error

func (*FSM) Snapshot

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

type Snapshot

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

func (*Snapshot) Persist

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

func (*Snapshot) Release

func (s *Snapshot) Release()

Jump to

Keyboard shortcuts

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