Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Region ¶
type Region interface {
// Put puts a key-value pair to region.
Put(key []byte, value []byte) error
// Get gets value by key from region.
Get(key []byte) ([]byte, error)
// Delete deletes a key-value pair from region.
Delete(key []byte) error
// GetStartKey gets the start key of the region.
GetStartKey() []byte
// GetEndKey gets the end key of the region.
GetEndKey() []byte
// GetLeader gets the leader peer of the region.
GetLeader() string
// GetPeers gets the peers of the region.
GetPeers() []string
// TransferLeader transfers the leader role to a specified peer.
TransferLeader(peer string) error
// AddPeer adds a new peer to the raft group.
AddPeer(peer string) error
// RemovePeer removes a peer from the raft group.
RemovePeer(peer string) error
// GetSize gets the total size of the region.
GetSize() int64
}
Region is the interface of region.
Click to show internal directories.
Click to hide internal directories.