Documentation ¶
Index ¶
- Constants
- func AddMerge(sr *vearchpb.SearchResult, other *vearchpb.SearchResult) (err error)
- func AddMergeResultArr(dest []*vearchpb.SearchResult, src []*vearchpb.SearchResult) error
- func BulkMergeArrForField(dest []*vearchpb.SearchResult, src []*vearchpb.SearchResult, ...) error
- func ChangeMember(addr string, changeMember *entity.ChangeMember) error
- func Compare(old float64, new float64) int
- func CreatePartition(addr string, space *entity.Space, pid uint32) error
- func DeletePartition(addr string, pid uint32) error
- func DeleteReplica(addr string, partitionId uint32) error
- func Execute(addr, servicePath string, args *vearchpb.PartitionData, ...) (err error)
- func GetEngineCfg(addr string, pid entity.PartitionID) (cfg *entity.EngineCfg, err error)
- func GetMD5Encode(data string) string
- func GetNodeIdsByClientType(clientType string, partition *entity.Partition, servers *cache.Cache) entity.NodeID
- func GetSource(doc *vearchpb.ResultItem, space *entity.Space, idIsLong bool, ...) (json.RawMessage, []sortorder.SortValue, string, error)
- func HitsMergeForField(dh []*vearchpb.ResultItem, firstSortValue map[string][]sortorder.SortValue, ...) []*vearchpb.ResultItem
- func IsLive(addr string) bool
- func Merge(ss *vearchpb.SearchStatus, other *vearchpb.SearchStatus)
- func MergeArrForField(dest []*vearchpb.SearchResult, src []*vearchpb.SearchResult, ...) error
- func MergeForField(old *vearchpb.SearchResult, other *vearchpb.SearchResult, ...) (err error)
- func NewRouterRequest(ctx context.Context, client *Client) *routerRequest
- func NewWatchServerCache(serverCtx context.Context, cli *Client) error
- func PartitionInfo(addr string, pid entity.PartitionID) (value *entity.PartitionInfo, err error)
- func PartitionInfos(addr string) (value []*entity.PartitionInfo, err error)
- func SearchStatusMerge(old *vearchpb.SearchStatus, other *vearchpb.SearchStatus) *vearchpb.SearchStatus
- func ServerStats(addr string) *mserver.ServerStats
- func UpdateEngineCfg(addr string, cacheCfg *entity.EngineCfg, pid entity.PartitionID) error
- func UpdatePartition(addr string, space *entity.Space, pid entity.PartitionID) error
- type Client
- type ClientType
- type MasterServer
Constants ¶
View Source
const ( HandlerType = "type" UnaryHandler = "UnaryHandler" SearchHandler = "SearchHandler" BulkSearchHandler = "BulkSearchHandler" DeleteByQueryHandler = "DeleteByQueryHandler" MSearchHandler = "MSearchHandler" MSearchIDsHandler = "MSearchIDsHandler" MSearchForIDsHandler = "MSearchForIDsHandler" MSearchNewHandler = "MSearchNewHandler" StreamSearchHandler = "StreamSearchHandler" GetDocHandler = "GetDocHandler" GetDocsHandler = "GetDocsHandler" CreateDocHandler = "CreateDocHandler" DeleteDocsHandler = "DeleteDocsHandler" ReplaceDocHandler = "ReplaceDocHandler" BatchHandler = "BatchHandler" ForceMergeHandler = "ForceMergeHandler" FlushHandler = "FlushHandler" CreatePartitionHandler = "CreatePartitionHandler" DeletePartitionHandler = "DeletePartitionHandler" DeleteReplicaHandler = "DeleteReplicaHandler" UpdatePartitionHandler = "UpdatePartitionHandler" StatsHandler = "StatsHandler" IsLiveHandler = "IsLiveHandler" PartitionInfoHandler = "PartitionInfoHandler" ChangeMemberHandler = "ChangeMemberHandler" EngineCfgHandler = "EngineCfgHandler" )
View Source
const Authorization = "Authorization"
Authorization default Authorization
View Source
const (
DefaultPsTimeOut = 5
)
View Source
const (
// MessageID the key of message
MessageID = "message_id"
)
View Source
const Root = "root"
Root default root
Variables ¶
This section is empty.
Functions ¶
func AddMerge ¶
func AddMerge(sr *vearchpb.SearchResult, other *vearchpb.SearchResult) (err error)
func AddMergeResultArr ¶
func AddMergeResultArr(dest []*vearchpb.SearchResult, src []*vearchpb.SearchResult) error
func BulkMergeArrForField ¶
func ChangeMember ¶
func ChangeMember(addr string, changeMember *entity.ChangeMember) error
func DeletePartition ¶
func DeleteReplica ¶
func Execute ¶
func Execute(addr, servicePath string, args *vearchpb.PartitionData, reply *vearchpb.PartitionData) (err error)
Execute add retry to handle no leader and not leader situation
func GetEngineCfg ¶
func GetMD5Encode ¶
GetMD5Encode return md5 value of given data
func GetNodeIdsByClientType ¶
func HitsMergeForField ¶
func HitsMergeForField(dh []*vearchpb.ResultItem, firstSortValue map[string][]sortorder.SortValue, spid, fpid uint32, sh []*vearchpb.ResultItem, sortOrder sortorder.SortOrder, from, size int32) []*vearchpb.ResultItem
func Merge ¶
func Merge(ss *vearchpb.SearchStatus, other *vearchpb.SearchStatus)
func MergeArrForField ¶
func MergeForField ¶
func NewRouterRequest ¶
NewRouterRequest create a new request for router
func NewWatchServerCache ¶
NewWatchServerCache watch ps server put and delete status
func PartitionInfo ¶
func PartitionInfo(addr string, pid entity.PartitionID) (value *entity.PartitionInfo, err error)
PartitionInfo get partition info about partitionID
func PartitionInfos ¶
func PartitionInfos(addr string) (value []*entity.PartitionInfo, err error)
PartitionInfos get all partition info from server
func SearchStatusMerge ¶
func SearchStatusMerge(old *vearchpb.SearchStatus, other *vearchpb.SearchStatus) *vearchpb.SearchStatus
func ServerStats ¶
func ServerStats(addr string) *mserver.ServerStats
func UpdateEngineCfg ¶
func UpdatePartition ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client include client of master and ps
type ClientType ¶
type ClientType int
ClientType decide the method to choose raft
const ( LEADER ClientType = iota NOTLEADER RANDOM ALL )
type MasterServer ¶
type MasterServer struct {
// contains filtered or unexported fields
}
MasterServer the num of master
Click to show internal directories.
Click to hide internal directories.