kv

package
v0.0.0-...-c817ce6 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2020 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Storage

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

func New

func New() *Storage

func (*Storage) Do

func (s *Storage) Do(cmd string, value interface{}, reply interface{}) error

func (*Storage) ReadSnapshot

func (s *Storage) ReadSnapshot(datafile string, reply *int64) error

func (*Storage) WriteDataIni

func (s *Storage) WriteDataIni(f *os.File, content int64) error

func (*Storage) WriteSnapshot

func (s *Storage) WriteSnapshot(datafile string, index int64) error

type StorageClient

type StorageClient struct {
	Leader *rpclib.Node
	// contains filtered or unexported fields
}

func NewClient

func NewClient(peers []string) *StorageClient

func (*StorageClient) CallGet

func (sc *StorageClient) CallGet(key string) (*RetValue, error)

func (*StorageClient) CallPut

func (sc *StorageClient) CallPut(key string, value string) (*RetValue, error)

Jump to

Keyboard shortcuts

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