Documentation ¶
Index ¶
- Variables
- func GetIPv4ForInterfaceName(ifname string) string
- func SLogger() *common.LevelLogger
- func SetLogger(level int32, logger common.Logger)
- type ConfigFile
- type NamespaceNodeConfig
- type RaftStatus
- type Server
- func (s *Server) ApplyRaftReqs(ctx context.Context, reqs *syncerpb.RaftReqs) (*syncerpb.RpcErr, error)
- func (s *Server) DeleteRange(ns string, dtr node.DeleteTableRange) error
- func (s *Server) GetApplySnapStatus(ctx context.Context, req *syncerpb.RaftApplySnapStatusReq) (*syncerpb.RaftApplySnapStatusRsp, error)
- func (s *Server) GetCoord() *datanode_coord.DataCoordinator
- func (s *Server) GetDBStats(leaderOnly bool) map[string]string
- func (s *Server) GetHandler(cmdName string, cmd redcon.Command) (bool, common.CommandFunc, redcon.Command, error)
- func (s *Server) GetLogSyncStats(leaderOnly bool, srcClusterName string) []common.LogSyncStats
- func (s *Server) GetLogSyncStatsInSyncLearner() ([]common.LogSyncStats, []common.LogSyncStats)
- func (s *Server) GetMergeHandlers(cmd redcon.Command) ([]common.MergeCommandFunc, []redcon.Command, bool, error)
- func (s *Server) GetNamespace(ns string, pk []byte) (*node.NamespaceNode, error)
- func (s *Server) GetNamespaceFromFullName(ns string) *node.NamespaceNode
- func (s *Server) GetStats(leaderOnly bool) common.ServerStats
- func (s *Server) GetSyncedRaft(ctx context.Context, req *syncerpb.SyncedRaftReq) (*syncerpb.SyncedRaftRsp, error)
- func (s *Server) InitKVNamespace(id uint64, conf *node.NamespaceConfig, join bool) (*node.NamespaceNode, error)
- func (s *Server) IsPeerRemoved(peerID uint64) bool
- func (s *Server) NotifyApplySnap(ctx context.Context, req *syncerpb.RaftApplySnapReq) (*syncerpb.RpcErr, error)
- func (s *Server) NotifyTransferSnap(ctx context.Context, req *syncerpb.RaftApplySnapReq) (*syncerpb.RpcErr, error)
- func (s *Server) OptimizeDB(ns string, table string)
- func (s *Server) Process(ctx context.Context, m raftpb.Message) error
- func (s *Server) ReportSnapshot(id uint64, gp raftpb.Group, status raft.SnapshotStatus)
- func (s *Server) ReportUnreachable(id uint64, group raftpb.Group)
- func (s *Server) RestartAsStandalone(fullNamespace string) error
- func (s *Server) SaveDBFrom(r io.Reader, msg raftpb.Message) (int64, error)
- func (s *Server) ServeHTTP(w http.ResponseWriter, req *http.Request)
- func (s *Server) Start()
- func (s *Server) Stop()
- type ServerConfig
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func GetIPv4ForInterfaceName ¶
func SLogger ¶
func SLogger() *common.LevelLogger
Types ¶
type ConfigFile ¶
type ConfigFile struct {
ServerConf ServerConfig `json:"server_conf"`
}
type NamespaceNodeConfig ¶
type RaftStatus ¶
type RaftStatus struct { LeaderInfo *common.MemberInfo Members []*common.MemberInfo Learners []*common.MemberInfo RaftStat raft.Status }
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func NewServer ¶
func NewServer(conf ServerConfig) *Server
func (*Server) ApplyRaftReqs ¶
func (*Server) DeleteRange ¶ added in v0.3.2
func (s *Server) DeleteRange(ns string, dtr node.DeleteTableRange) error
func (*Server) GetApplySnapStatus ¶
func (s *Server) GetApplySnapStatus(ctx context.Context, req *syncerpb.RaftApplySnapStatusReq) (*syncerpb.RaftApplySnapStatusRsp, error)
func (*Server) GetCoord ¶
func (s *Server) GetCoord() *datanode_coord.DataCoordinator
func (*Server) GetHandler ¶
func (*Server) GetLogSyncStats ¶
func (s *Server) GetLogSyncStats(leaderOnly bool, srcClusterName string) []common.LogSyncStats
func (*Server) GetLogSyncStatsInSyncLearner ¶ added in v0.4.0
func (s *Server) GetLogSyncStatsInSyncLearner() ([]common.LogSyncStats, []common.LogSyncStats)
func (*Server) GetMergeHandlers ¶
func (*Server) GetNamespace ¶
func (*Server) GetNamespaceFromFullName ¶
func (s *Server) GetNamespaceFromFullName(ns string) *node.NamespaceNode
func (*Server) GetSyncedRaft ¶
func (s *Server) GetSyncedRaft(ctx context.Context, req *syncerpb.SyncedRaftReq) (*syncerpb.SyncedRaftRsp, error)
func (*Server) InitKVNamespace ¶
func (s *Server) InitKVNamespace(id uint64, conf *node.NamespaceConfig, join bool) (*node.NamespaceNode, error)
func (*Server) IsPeerRemoved ¶
func (*Server) NotifyApplySnap ¶
func (*Server) NotifyTransferSnap ¶
func (*Server) OptimizeDB ¶
func (*Server) ReportSnapshot ¶
func (*Server) ReportUnreachable ¶
func (*Server) RestartAsStandalone ¶
func (*Server) SaveDBFrom ¶
implement the snapshotter interface for transport
type ServerConfig ¶
type ServerConfig struct { // this cluster id is used for server transport to tell // different global cluster ClusterID string `json:"cluster_id"` EtcdClusterAddresses string `json:"etcd_cluster_addresses"` BroadcastInterface string `json:"broadcast_interface"` BroadcastAddr string `json:"broadcast_addr"` RedisAPIPort int `json:"redis_api_port"` HttpAPIPort int `json:"http_api_port"` GrpcAPIPort int `json:"grpc_api_port"` ProfilePort int `json:"profile_port"` DataDir string `json:"data_dir"` DataRsyncModule string `json:"data_rsync_module"` LocalRaftAddr string `json:"local_raft_addr"` Tags map[string]string `json:"tags"` SyncerWriteOnly bool `json:"syncer_write_only"` SyncerNormalInit bool `json:"syncer_normal_init"` LearnerRole string `json:"learner_role"` RemoteSyncCluster string `json:"remote_sync_cluster"` StateMachineType string `json:"state_machine_type"` ElectionTick int `json:"election_tick"` TickMs int `json:"tick_ms"` // default rocksdb options, can be override by namespace config RocksDBOpts rockredis.RockOptions `json:"rocksdb_opts"` Namespaces []NamespaceNodeConfig `json:"namespaces"` MaxScanJob int32 `json:"max_scan_job"` }
Click to show internal directories.
Click to hide internal directories.