store

package
v0.0.0-...-b2d9faf Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotLeader error = errors.New("not leader")

Functions

This section is empty.

Types

type Store

type Store struct {
	RaftDir  string
	RaftBind string
	// contains filtered or unexported fields
}

func New

func New(raftdir, raftbind string) (*Store, error)

func (*Store) Delete

func (s *Store) Delete(key string) error

func (*Store) Get

func (s *Store) Get(key string) (int, error)

func (*Store) Join

func (s *Store) Join(nodeID, addr string) error

func (*Store) Leave

func (s *Store) Leave(nodeID string) error

func (*Store) Open

func (s *Store) Open(bootstrap bool, localID string) error

func (*Store) Set

func (s *Store) Set(key, value string) error

func (*Store) Snapshot

func (s *Store) Snapshot() error

Jump to

Keyboard shortcuts

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