Documentation ¶
Index ¶
- func ExportToRpcAdminHandler(server *Server)
- func ExportToRpcHandler(server *Server)
- type Base
- type ChangeMemberHandler
- type CreatePartitionHandler
- type DeletePartitionHandler
- type DeleteReplicaHandler
- type EngineCfgHandler
- type InitAdminHandler
- type InitHandler
- type IsLiveHandler
- type PartitionInfoHandler
- type PartitionStore
- type Raft
- type Server
- func (s *Server) Close() error
- func (s *Server) ClosePartitions()
- func (s *Server) CreatePartition(ctx context.Context, space *entity.Space, pid entity.PartitionID) error
- func (s *Server) DeletePartition(id entity.PartitionID)
- func (s *Server) DeleteReplica(id entity.PartitionID)
- func (s *Server) GetPartition(id entity.PartitionID) (partition PartitionStore)
- func (s *Server) HandleRaftFatalEvent(event *raftstore.RaftFatalEvent)
- func (s *Server) HandleRaftLeaderEvent(event *raftstore.RaftLeaderEvent)
- func (s *Server) HandleRaftReplicaEvent(event *raftstore.RaftReplicaEvent)
- func (s *Server) LoadPartition(ctx context.Context, pid entity.PartitionID) (PartitionStore, error)
- func (s *Server) PartitionNum() int
- func (s *Server) RangePartition(fun func(entity.PartitionID, PartitionStore))
- func (s *Server) Start() error
- func (s *Server) StartHeartbeatJob()
- type StatsHandler
- type UnaryHandler
- type UpdatePartitionHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExportToRpcAdminHandler ¶
func ExportToRpcAdminHandler(server *Server)
func ExportToRpcHandler ¶
func ExportToRpcHandler(server *Server)
Types ¶
type Base ¶
type Base interface { Start() error // Destroy close partition store if it running currently. Close() error // Destroy close partition store if it running currently and remove all data file from filesystem. Destroy() error // GetMeta returns meta information about this store. GetPartition() *entity.Partition //GetEngine return engine GetEngine() engine.Engine //space change API GetSpace() entity.Space // SetSpace SetSpace(space *entity.Space) }
type ChangeMemberHandler ¶
type ChangeMemberHandler struct {
// contains filtered or unexported fields
}
func (*ChangeMemberHandler) Execute ¶
func (ch *ChangeMemberHandler) Execute(ctx context.Context, req *vearchpb.PartitionData, reply *vearchpb.PartitionData) error
type CreatePartitionHandler ¶
type CreatePartitionHandler struct {
// contains filtered or unexported fields
}
func (*CreatePartitionHandler) Execute ¶
func (c *CreatePartitionHandler) Execute(ctx context.Context, req *vearchpb.PartitionData, reply *vearchpb.PartitionData) error
type DeletePartitionHandler ¶
type DeletePartitionHandler struct {
// contains filtered or unexported fields
}
func (*DeletePartitionHandler) Execute ¶
func (d *DeletePartitionHandler) Execute(ctx context.Context, req *vearchpb.PartitionData, reply *vearchpb.PartitionData) error
type DeleteReplicaHandler ¶
type DeleteReplicaHandler struct {
// contains filtered or unexported fields
}
func (*DeleteReplicaHandler) Execute ¶
func (d *DeleteReplicaHandler) Execute(ctx context.Context, req *vearchpb.PartitionData, reply *vearchpb.PartitionData) error
type EngineCfgHandler ¶
type EngineCfgHandler struct {
// contains filtered or unexported fields
}
func (*EngineCfgHandler) Execute ¶
func (ch *EngineCfgHandler) Execute(ctx context.Context, req *vearchpb.PartitionData, reply *vearchpb.PartitionData) (err error)
type InitAdminHandler ¶
type InitAdminHandler struct {
// contains filtered or unexported fields
}
func (*InitAdminHandler) Execute ¶
func (i *InitAdminHandler) Execute(ctx context.Context, req *vearchpb.PartitionData, reply *vearchpb.PartitionData) error
type InitHandler ¶
type InitHandler struct {
// contains filtered or unexported fields
}
func (*InitHandler) Execute ¶
func (i *InitHandler) Execute(ctx context.Context, req *vearchpb.PartitionData, reply *vearchpb.PartitionData) error
type IsLiveHandler ¶
type IsLiveHandler int
func (*IsLiveHandler) Execute ¶
func (*IsLiveHandler) Execute(ctx context.Context, req *vearchpb.PartitionData, reply *vearchpb.PartitionData) error
type PartitionInfoHandler ¶
type PartitionInfoHandler struct {
// contains filtered or unexported fields
}
func (*PartitionInfoHandler) Execute ¶
func (pih *PartitionInfoHandler) Execute(ctx context.Context, req *vearchpb.PartitionData, reply *vearchpb.PartitionData) (err error)
type PartitionStore ¶
type PartitionStore interface { Base Raft UpdateSpace(ctx context.Context, space *entity.Space) error GetDocument(ctx context.Context, readLeader bool, doc *vearchpb.Document) (err error) Write(ctx context.Context, request *vearchpb.DocCmd) (err error) Flush(ctx context.Context) error Search(ctx context.Context, query *vearchpb.SearchRequest, response *vearchpb.SearchResponse) error }
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server partition server
func (*Server) ClosePartitions ¶
func (s *Server) ClosePartitions()
func (*Server) CreatePartition ¶
func (*Server) DeletePartition ¶
func (s *Server) DeletePartition(id entity.PartitionID)
func (*Server) DeleteReplica ¶
func (s *Server) DeleteReplica(id entity.PartitionID)
func (*Server) GetPartition ¶
func (s *Server) GetPartition(id entity.PartitionID) (partition PartitionStore)
func (*Server) HandleRaftFatalEvent ¶
func (s *Server) HandleRaftFatalEvent(event *raftstore.RaftFatalEvent)
func (*Server) HandleRaftLeaderEvent ¶
func (s *Server) HandleRaftLeaderEvent(event *raftstore.RaftLeaderEvent)
on leader change it will notify master
func (*Server) HandleRaftReplicaEvent ¶
func (s *Server) HandleRaftReplicaEvent(event *raftstore.RaftReplicaEvent)
func (*Server) LoadPartition ¶
func (s *Server) LoadPartition(ctx context.Context, pid entity.PartitionID) (PartitionStore, error)
load partition for in disk
func (*Server) PartitionNum ¶
func (*Server) RangePartition ¶
func (s *Server) RangePartition(fun func(entity.PartitionID, PartitionStore))
func (*Server) StartHeartbeatJob ¶
func (s *Server) StartHeartbeatJob()
this job for heartbeat master 1m once
type StatsHandler ¶
type StatsHandler struct {
// contains filtered or unexported fields
}
func (*StatsHandler) Execute ¶
func (sh *StatsHandler) Execute(ctx context.Context, req *vearchpb.PartitionData, reply *vearchpb.PartitionData) error
type UnaryHandler ¶
type UnaryHandler struct {
// contains filtered or unexported fields
}
func (*UnaryHandler) Execute ¶
func (handler *UnaryHandler) Execute(ctx context.Context, req *vearchpb.PartitionData, reply *vearchpb.PartitionData) (err error)
type UpdatePartitionHandler ¶
type UpdatePartitionHandler struct {
// contains filtered or unexported fields
}
func (*UpdatePartitionHandler) Execute ¶
func (handler *UpdatePartitionHandler) Execute(ctx context.Context, req *vearchpb.PartitionData, reply *vearchpb.PartitionData) error
Source Files ¶
Click to show internal directories.
Click to hide internal directories.