states

package
v0.0.0-...-b853609 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2020 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AlreadyLocked = errors.New("state is already locked")

Functions

This section is empty.

Types

type Mgr

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

func (*Mgr) Close

func (m *Mgr) Close() error

func (*Mgr) GetContent

func (m *Mgr) GetContent(name, id string) ([]byte, error)

func (*Mgr) GetHistory

func (m *Mgr) GetHistory(name string) []string

func (*Mgr) GetState

func (m *Mgr) GetState(name string) ([]byte, error)

func (*Mgr) GetStates

func (m *Mgr) GetStates() []string

func (*Mgr) Init

func (m *Mgr) Init(cfg config.Config) error

func (*Mgr) LockState

func (m *Mgr) LockState(name string) error

func (*Mgr) PutState

func (m *Mgr) PutState(name string, content []byte) error

func (*Mgr) UnlockState

func (m *Mgr) UnlockState(name string) error

type State

type State struct {
	Name     string
	Previous string
	Checksum string
	// contains filtered or unexported fields
}

func NewState

func NewState(name string, content []byte) *State

func NextState

func NextState(state State, newcontent []byte) *State

func (State) Verify

func (s State) Verify() bool

Jump to

Keyboard shortcuts

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