Documentation
¶
Index ¶
- Constants
- Variables
- func MKeys(m map[string]string) []string
- func PrintMapDiff(baseKv, newKv map[string]string)
- type FsmCommand
- type Peer
- func (s *Peer) Close() error
- func (s *Peer) Delete(bucket, key string) error
- func (s *Peer) Get(bucket, k string) (result string, found bool, e error)
- func (s *Peer) Join(nodeID, addr string) error
- func (s *Peer) Keys(bucket string) (map[string]string, error)
- func (s *Peer) KeysWithoutValues(bucket string) (keys []string, err error)
- func (s *Peer) MakeSureLeader() error
- func (s *Peer) Open(enableSingle bool, localID string) error
- func (s *Peer) PDelete(bucket string, keys []string) error
- func (s *Peer) PGet(bucket string, keys []string) (map[string]string, error)
- func (s *Peer) PSet(bucket string, kv map[string]string) error
- func (s *Peer) Set(bucket, k, v string) error
- func (s *Peer) Stats() map[string]string
- type Stats
Constants ¶
View Source
const ( FsmCommandSet = "Set" FsmCommandDel = "Delete" )
View Source
const (
BucketSpliter = "@"
)
Variables ¶
View Source
var ( EmptyBucket = []byte{} EmptyBucketLength = len(EmptyBucket) LogBucket = []byte("_rlb_") // raft log bucket LogBucketLength = len(LogBucket) StableBucket = []byte("_rsl_") // raft stable log StableBucketLength = len(StableBucket) FsmBucket = []byte("_rfb_") // raft fsm bucket FsmBucketLength = len(FsmBucket) FsmCmd = map[string]interface{}{ FsmCommandSet: nil, FsmCommandDel: nil, } )
Functions ¶
func PrintMapDiff ¶
Types ¶
type FsmCommand ¶
type Peer ¶
func (*Peer) KeysWithoutValues ¶
KeysWithoutValues in bucket
func (*Peer) MakeSureLeader ¶
MakeSureLeader user set, delete should on leader. no need to read
Click to show internal directories.
Click to hide internal directories.