Documentation
¶
Index ¶
- type NodeState
- type Service
- func (k *Service) ApplyWALRecord(record WALRecord) error
- func (k *Service) Del(key string) error
- func (k *Service) Get(key string) (string, error)
- func (k *Service) GetLastSeq() int64
- func (k *Service) GetWALSince(seq int64) []WALRecord
- func (k *Service) RegisterWithController() error
- func (k *Service) Set(key, value string) error
- func (k *Service) Start() error
- func (k *Service) UpdateFollowerProgress(followerID int, seq int64)
- func (k *Service) UpdateNodeState(state cluster.StoreNodeType, leaderID int) error
- type Storage
- type WAL
- func (w *WAL) Append(op, key, value string)
- func (w *WAL) ClearUntil(seq int64)
- func (w *WAL) GetLastSeq() int64
- func (w *WAL) GetMinFollowerSeq() int64
- func (w *WAL) GetSince(seq int64) []WALRecord
- func (w *WAL) RemoveFollower(followerID int)
- func (w *WAL) UpdateFollowerProgress(followerID int, seq int64)
- type WALRecord
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NodeState ¶
type NodeState struct {
IsMaster bool
ShardKey int
LastWALSeq int64
LeaderID int
MasterAddress string
MasterPort int
NodeID int
}
NodeState contains configs, and metadata fetched from controller
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewKvNodeService ¶
func NewKvNodeService(cfg *config.KvNodeConfig) *Service
func (*Service) ApplyWALRecord ¶
func (*Service) GetLastSeq ¶
func (*Service) GetWALSince ¶
func (*Service) RegisterWithController ¶
func (*Service) UpdateFollowerProgress ¶
func (*Service) UpdateNodeState ¶
func (k *Service) UpdateNodeState(state cluster.StoreNodeType, leaderID int) error
type Storage ¶
type Storage struct {
// contains filtered or unexported fields
}
func NewNodeStore ¶
func NewNodeStore() *Storage
type WAL ¶
func (*WAL) ClearUntil ¶
func (*WAL) GetLastSeq ¶
func (*WAL) GetMinFollowerSeq ¶
func (*WAL) RemoveFollower ¶
func (*WAL) UpdateFollowerProgress ¶
Click to show internal directories.
Click to hide internal directories.