raftimpl

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RaftNode

type RaftNode interface {
	// GetKV get value of key
	GetKV(getReq *apicassemdb.GetKVReq) (*apicassemdb.Entity, error)
	// SetKV save key and value
	SetKV(setReq *apicassemdb.SetKVReq) error
	// UnsetKV save key and value
	UnsetKV(unsetReq *apicassemdb.UnsetKVReq) error
	Range(rangeReq *apicassemdb.RangeReq) (*apicassemdb.RangeResp, error)
	Expire(expireReq *apicassemdb.ExpireReq) error

	// IsLeader returns current node is leader or not. true mean leader.
	IsLeader() bool
	LeaderChangeCh(chan<- bool)
	ChangeNotifyCh() <-chan watcher.IChange

	Shutdown() error
}

RaftNode defines the ability of what raft component should act.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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