Documentation ¶
Index ¶
- func DeleteCell(id uint64, wb storage.WriteBatch) error
- func GetMaxKey() []byte
- func GetMinKey() []byte
- func GetStoreIdentKey() []byte
- func HasOverlap(c1, c2 *metapb.Cell) bool
- func SaveCell(driver storage.Driver, cell metapb.Cell) error
- func StalEpoch(target, check metapb.CellEpoch) bool
- type Cfg
- type PeerReplicate
- type SnapshotManager
- type Store
- func (s *Store) GetID() uint64
- func (s *Store) GetMeta() metapb.Store
- func (s *Store) OnProxyReq(req *raftcmdpb.Request, cb func(*raftcmdpb.RaftCMDResponse)) error
- func (s *Store) OnRedisCommand(sessionID int64, cmdType raftcmdpb.CMDType, cmd redis.Command, ...) ([]byte, error)
- func (s *Store) SetKeyConvertFun(fn func([]byte, func([]byte) metapb.Cell) metapb.Cell)
- func (s *Store) Start()
- func (s *Store) Stop() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteCell ¶
func DeleteCell(id uint64, wb storage.WriteBatch) error
DeleteCell delete cell with state, raft state and apply state.
Types ¶
type Cfg ¶
type Cfg struct { Addr string DataPath string OptionPath string CellCapacity uint64 DurationHeartbeatStore time.Duration DurationHeartbeatCell time.Duration DurationSplitCheck time.Duration DurationCompact time.Duration DurationReportMetric time.Duration DurationRaftTick time.Duration DurationRetrySentSnapshot time.Duration LimitPeerDownDuration time.Duration LimitCompactCount uint64 LimitCompactBytes uint64 LimitCompactLag uint64 LimitRaftMsgCount int LimitRaftMsgBytes uint64 LimitRaftEntryBytes uint64 LimitSnapChunkBytes uint64 LimitSnapChunkRate uint64 LimitConcurrencyWrite uint64 LimitNemoInstance int ThresholdCompact uint64 ThresholdSplitCheckBytes uint64 ThresholdRaftElection int ThresholdRaftHeartbeat int BatchSizeProposal uint64 BatchSizeSent uint64 WorkerCountSent uint64 WorkerCountSentSnap uint64 WorkerCountApply uint64 EnableSyncRaftLog bool EnableMetricsRequest bool }
Cfg for raftstore
type PeerReplicate ¶
type PeerReplicate struct {
// contains filtered or unexported fields
}
PeerReplicate is the cell's peer replicate. Every cell replicate has a PeerReplicate.
type SnapshotManager ¶
type SnapshotManager interface { Register(msg *mraft.SnapshotMessage, step int) bool Deregister(msg *mraft.SnapshotMessage, step int) Create(msg *mraft.SnapshotMessage) error Exists(msg *mraft.SnapshotMessage) bool WriteTo(msg *mraft.SnapshotMessage, conn goetty.IOSession) (uint64, error) CleanSnap(msg *mraft.SnapshotMessage) error ReceiveSnapData(msg *mraft.SnapshotMessage) error Apply(msg *mraft.SnapshotMessage) error }
SnapshotManager manager snapshot
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store is the store for raft
func NewStore ¶
func NewStore(clusterID uint64, pdClient *pd.Client, meta metapb.Store, engines []storage.Driver, cfg *Cfg) *Store
NewStore returns store
func (*Store) OnProxyReq ¶
OnProxyReq process proxy req
func (*Store) OnRedisCommand ¶
func (s *Store) OnRedisCommand(sessionID int64, cmdType raftcmdpb.CMDType, cmd redis.Command, cb func(*raftcmdpb.RaftCMDResponse)) ([]byte, error)
OnRedisCommand process redis command
func (*Store) SetKeyConvertFun ¶
SetKeyConvertFun set key convert function
Source Files ¶
- cfg.go
- cmd.go
- codec.go
- errors.go
- keys.go
- map.go
- metrics.go
- metrics_command.go
- metrics_raft.go
- metrics_request.go
- metrics_snapshot.go
- metrics_store.go
- peer.go
- peer_job.go
- peer_raft.go
- peer_storage.go
- pool.go
- propose_batch.go
- raft_apply.go
- raft_apply_batch_bitmap.go
- raft_apply_batch_kv.go
- raft_apply_cmd.go
- raft_handle_do.go
- redis.go
- redis_bitmap.go
- redis_hash.go
- redis_kv.go
- redis_list.go
- redis_lock.go
- redis_set.go
- redis_zset.go
- snap.go
- store.go
- store_check.go
- transport.go
- util.go
Click to show internal directories.
Click to hide internal directories.