client

package
v3.1.0+incompatible Latest Latest
Warning

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

Go to latest
Published: May 29, 2020 License: Apache-2.0, MIT Imports: 42 Imported by: 0

Documentation

Index

Constants

View Source
const (
	//doc handler
	SearchHandler        = "SearchHandler"
	DeleteByQueryHandler = "DeleteByQueryHandler"
	MSearchHandler       = "MSearchHandler"
	MSearchIDsHandler    = "MSearchIDsHandler"
	MSearchForIDsHandler = "MSearchForIDsHandler"
	MSearchNewHandler    = "MSearchNewHandler"

	StreamSearchHandler = "StreamSearchHandler"
	GetDocHandler       = "GetDocHandler"
	GetDocsHandler      = "GetDocsHandler"
	WriteHandler        = "WriteHandler"
	BatchHandler        = "BatchHandler"
	FlushHandler        = "FlushHandler"
	ForceMergeHandler   = "ForceMergeHandler"

	//admin handler
	CreatePartitionHandler = "CreatePartitionHandler"
	DeletePartitionHandler = "DeletePartitionHandler"
	DeleteReplicaHandler   = "DeleteReplicaHandler"
	UpdatePartitionHandler = "UpdatePartitionHandler"
	StatsHandler           = "StatsHandler"
	IsLiveHandler          = "IsLiveHandler"
	PartitionInfoHandler   = "PartitionInfoHandler"
	ChangeMemberHandler    = "ChangeMemberHandler"
)
View Source
const Authorization = "Authorization"
View Source
const Root = "root"

Variables

This section is empty.

Functions

func BytesToInt64

func BytesToInt64(buf []byte) int64

func Doc2DocResult

func Doc2DocResult(item *gamma_api.ResultItem, partitionID uint32,
	arrayBool bool, spaceId int64, dbId int64, fieldType map[string]pspb.FieldType) *response.DocResult

func Execute

func Execute(addr, servicePath string, request request.Request) (interface{}, int64, error)

ExecuteErrorChangeRetry add retry to handle no leader and not leader situation

func ResultItem2DocIDResult

func ResultItem2DocIDResult(item *gamma_api.ResultItem, partitionID uint32,
	spaceId int64, dbId int64, idType string) *response.DocResult

func ResultItem2DocResult

func ResultItem2DocResult(item *gamma_api.ResultItem, partitionID uint32,
	arrayBool bool, spaceId int64, dbId int64, fieldType map[string]pspb.FieldType) *response.DocResult

func Slot

func Slot(routingValue string) uint32

Types

type Client

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

func NewClient

func NewClient(conf *config.Config) (client *Client, err error)

func (*Client) Master

func (client *Client) Master() *masterClient

func (*Client) PS

func (client *Client) PS() *psClient

func (*Client) Stop

func (client *Client) Stop()

type ClientType

type ClientType int
const (
	LEADER ClientType = iota
	NOT_LEADER
	RANDOM
	ALL
)

type MasterServer

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

Jump to

Keyboard shortcuts

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