ps

package
v3.2.7+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 2, 2021 License: Apache-2.0, MIT Imports: 37 Imported by: 1

Documentation

Index

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

type CreatePartitionHandler

type CreatePartitionHandler struct {
	// contains filtered or unexported fields
}

func (*CreatePartitionHandler) Execute

type DeletePartitionHandler

type DeletePartitionHandler struct {
	// contains filtered or unexported fields
}

func (*DeletePartitionHandler) Execute

type DeleteReplicaHandler

type DeleteReplicaHandler struct {
	// contains filtered or unexported fields
}

func (*DeleteReplicaHandler) Execute

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

type InitHandler

type InitHandler struct {
	// contains filtered or unexported fields
}

func (*InitHandler) Execute

type IsLiveHandler

type IsLiveHandler int

func (*IsLiveHandler) Execute

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 Raft

type Raft interface {
	GetLeader() (entity.NodeID, uint64)

	IsLeader() bool

	TryToLeader() error

	Status() *raft.Status

	GetVersion() uint64

	GetUnreachable(id uint64) []uint64

	ChangeMember(changeType proto.ConfChangeType, server *entity.Server) error
}

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server partition server

func NewServer

func NewServer(ctx context.Context) *Server

NewServer create server instance

func (*Server) Close

func (s *Server) Close() error

Stop stop server

func (*Server) ClosePartitions

func (s *Server) ClosePartitions()

func (*Server) CreatePartition

func (s *Server) CreatePartition(ctx context.Context, space *entity.Space, pid entity.PartitionID) error

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 (s *Server) PartitionNum() int

func (*Server) RangePartition

func (s *Server) RangePartition(fun func(entity.PartitionID, PartitionStore))

func (*Server) Start

func (s *Server) Start() error

Start start server

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

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL