proxy

package
v0.10.3-0...-6aaa926 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2024 License: Apache-2.0 Imports: 106 Imported by: 0

Documentation

Overview

Licensed to the LF AI & Data foundation under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed to the LF AI & Data foundation under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

// Licensed to the LF AI & Data foundation under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License.

Index

Constants

View Source
const (
	RoundRobin = "round_robin"
	LookAside  = "look_aside"
)
View Source
const (
	ReplicateMsgStreamTyp        = "replicate_msg_stream"
	ReplicateMsgStreamExpireTime = 30 * time.Second
)
View Source
const (
	SumScorer string = "sum"
	MaxScorer string = "max"
	AvgScorer string = "avg"
)
View Source
const (
	IgnoreGrowingKey     = "ignore_growing"
	ReduceStopForBestKey = "reduce_stop_for_best"
	IteratorField        = "iterator"
	GroupByFieldKey      = "group_by_field"
	GroupSizeKey         = "group_size"
	StrictGroupSize      = "strict_group_size"
	RankGroupScorer      = "rank_group_scorer"
	AnnsFieldKey         = "anns_field"
	TopKKey              = "topk"
	NQKey                = "nq"
	MetricTypeKey        = common.MetricTypeKey
	SearchParamsKey      = "params"
	ExprParamsKey        = "expr_params"
	RoundDecimalKey      = "round_decimal"
	OffsetKey            = "offset"
	LimitKey             = "limit"

	InsertTaskName                = "InsertTask"
	CreateCollectionTaskName      = "CreateCollectionTask"
	DropCollectionTaskName        = "DropCollectionTask"
	HasCollectionTaskName         = "HasCollectionTask"
	DescribeCollectionTaskName    = "DescribeCollectionTask"
	ShowCollectionTaskName        = "ShowCollectionTask"
	CreatePartitionTaskName       = "CreatePartitionTask"
	DropPartitionTaskName         = "DropPartitionTask"
	HasPartitionTaskName          = "HasPartitionTask"
	ShowPartitionTaskName         = "ShowPartitionTask"
	FlushTaskName                 = "FlushTask"
	LoadCollectionTaskName        = "LoadCollectionTask"
	ReleaseCollectionTaskName     = "ReleaseCollectionTask"
	LoadPartitionTaskName         = "LoadPartitionsTask"
	ReleasePartitionTaskName      = "ReleasePartitionsTask"
	DeleteTaskName                = "DeleteTask"
	CreateAliasTaskName           = "CreateAliasTask"
	DropAliasTaskName             = "DropAliasTask"
	AlterAliasTaskName            = "AlterAliasTask"
	DescribeAliasTaskName         = "DescribeAliasTask"
	ListAliasesTaskName           = "ListAliasesTask"
	AlterCollectionTaskName       = "AlterCollectionTask"
	UpsertTaskName                = "UpsertTask"
	CreateResourceGroupTaskName   = "CreateResourceGroupTask"
	UpdateResourceGroupsTaskName  = "UpdateResourceGroupsTask"
	DropResourceGroupTaskName     = "DropResourceGroupTask"
	TransferNodeTaskName          = "TransferNodeTask"
	TransferReplicaTaskName       = "TransferReplicaTask"
	ListResourceGroupsTaskName    = "ListResourceGroupsTask"
	DescribeResourceGroupTaskName = "DescribeResourceGroupTask"

	CreateDatabaseTaskName   = "CreateCollectionTask"
	DropDatabaseTaskName     = "DropDatabaseTaskName"
	ListDatabaseTaskName     = "ListDatabaseTaskName"
	AlterDatabaseTaskName    = "AlterDatabaseTaskName"
	DescribeDatabaseTaskName = "DescribeDatabaseTaskName"

	RankTypeKey      = "strategy"
	RankParamsKey    = "params"
	RRFParamsKey     = "k"
	WeightsParamsKey = "weights"
)
View Source
const (
	CreateIndexTaskName           = "CreateIndexTask"
	AlterIndexTaskName            = "AlterIndexTask"
	DescribeIndexTaskName         = "DescribeIndexTask"
	DropIndexTaskName             = "DropIndexTask"
	GetIndexStateTaskName         = "GetIndexStateTask"
	GetIndexBuildProgressTaskName = "GetIndexBuildProgressTask"

	AutoIndexName = common.AutoIndexName
	DimKey        = common.DimKey
	IsSparseKey   = common.IsSparseKey
)
View Source
const (
	WithCache    = true
	WithoutCache = false
)
View Source
const (
	RetrieveTaskName = "RetrieveTask"
	QueryTaskName    = "QueryTask"
)
View Source
const (
	SearchTaskName = "SearchTask"
	SearchLevelKey = "level"
)
View Source
const (
	GetCollectionStatisticsTaskName = "GetCollectionStatisticsTask"
	GetPartitionStatisticsTaskName  = "GetPartitionStatisticsTask"
)
View Source
const (

	// DefaultArithmeticIndexType name of default index type for scalar field
	DefaultArithmeticIndexType = indexparamcheck.IndexINVERTED

	// DefaultStringIndexType name of default index type for varChar/string field
	DefaultStringIndexType = indexparamcheck.IndexINVERTED
)
View Source
const (
	// sub -> role name, like admin, public
	// obj -> contact object with object name, like Global-*, Collection-col1
	// act -> privilege, like CreateCollection, DescribeCollection
	ModelStr = `` /* 333-byte string literal not displayed */

)

Variables

View Source
var (
	HTTPCollectionName = "collection_name"
	UnknownData        = "unknown"
)
View Source
var (
	Params = paramtable.Get()
)

Functions

func AppendUserInfoForRPC

func AppendUserInfoForRPC(ctx context.Context) context.Context

func AuthenticationInterceptor

func AuthenticationInterceptor(ctx context.Context) (context.Context, error)

AuthenticationInterceptor verify based on kv pair <"authorization": "token"> in header

func CheckDatabase

func CheckDatabase(ctx context.Context, dbName string) bool

func CheckVecIndexWithDataTypeExist

func CheckVecIndexWithDataTypeExist(name string, dType schemapb.DataType) bool

func CleanPrivilegeCache

func CleanPrivilegeCache()

func DBMatchFunc

func DBMatchFunc(args ...interface{}) (interface{}, error)

func DatabaseInterceptor

func DatabaseInterceptor() grpc.UnaryServerInterceptor

DatabaseInterceptor fill dbname into request based on kv pair <"dbname": "xx"> in header

func DeregisterSubLabel

func DeregisterSubLabel(subLabel string)

DeregisterSubLabel must add the sub-labels here if using other labels for the sub-labels

func ErrWithLog

func ErrWithLog(logger *log.MLogger, msg string, err error) error

func GetCachedCollectionSchema

func GetCachedCollectionSchema(ctx context.Context, dbName string, colName string) (*schemaInfo, error)

func GetCollectionRateSubLabel

func GetCollectionRateSubLabel(req any) string

func GetCostValue

func GetCostValue(status *commonpb.Status) int

func GetCurDBNameFromContextOrDefault

func GetCurDBNameFromContextOrDefault(ctx context.Context) string

func GetCurUserFromContext

func GetCurUserFromContext(ctx context.Context) (string, error)

func GetCurUserFromContextOrDefault

func GetCurUserFromContextOrDefault(ctx context.Context) string

func GetDynamicPool

func GetDynamicPool() *conc.Pool[any]

GetDynamicPool returns the singleton pool for dynamic cgo operations.

func GetFailedResponse

func GetFailedResponse(req any, err error) any

GetFailedResponse returns failed response.

func GetGroupScorer

func GetGroupScorer(scorerType string) (func(group *Group) error, error)

func GetPrivilegeCache

func GetPrivilegeCache(roleName, object, objectPrivilege string) (isPermit, cached bool, version int64)

func GetRequestBaseInfo

func GetRequestBaseInfo(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, skipBaseRequestInfo bool) []zap.Field

func GetRequestFieldWithoutSensitiveInfo

func GetRequestFieldWithoutSensitiveInfo(req interface{}) zap.Field

func GetRequestInfo

func GetRequestInfo(ctx context.Context, req interface{}) (int64, map[int64][]int64, internalpb.RateType, int, error)

GetRequestInfo returns collection name and rateType of request and return tokens needed.

func GetRole

func GetRole(username string) ([]string, error)

func HookInterceptor

func HookInterceptor(ctx context.Context, req any, userName, fullMethod string, handler grpc.UnaryHandler) (interface{}, error)

func IDs2Expr

func IDs2Expr(fieldName string, ids *schemapb.IDs) string

IDs2Expr converts ids slices to bool expresion with specified field name

func InitMetaCache

func InitMetaCache(ctx context.Context, rootCoord types.RootCoordClient, queryCoord types.QueryCoordClient, shardMgr shardClientMgr) error

InitMetaCache initializes globalMetaCache

func IsDDLRequest

func IsDDLRequest(rt internalpb.RateType) bool

func IsDefaultRole

func IsDefaultRole(roleName string) bool

func NewContextWithMetadata

func NewContextWithMetadata(ctx context.Context, username string, dbName string) context.Context

func NewReScorers

func NewReScorers(reqCnt int, rankParams []*commonpb.KeyValuePair) ([]reScorer, error)

func PasswordVerify

func PasswordVerify(ctx context.Context, username, rawPwd string) bool

func PrivilegeGroupContains

func PrivilegeGroupContains(args ...interface{}) (interface{}, error)

func PrivilegeInterceptor

func PrivilegeInterceptor(ctx context.Context, req interface{}) (context.Context, error)

func RateLimitInterceptor

func RateLimitInterceptor(limiter types.Limiter) grpc.UnaryServerInterceptor

RateLimitInterceptor returns a new unary server interceptors that performs request rate limiting.

func RegisterMgrRoute

func RegisterMgrRoute(proxy *Proxy)

func RepeatedKeyValToMap

func RepeatedKeyValToMap(kvPairs []*commonpb.KeyValuePair) (map[string]string, error)

RepeatedKeyValToMap transfer the kv pairs to map.

func ReplaceID2Name

func ReplaceID2Name(oldStr string, id int64, name string) string

func RoundRobinPolicy

func RoundRobinPolicy(
	ctx context.Context,
	mgr shardClientMgr,
	query queryFunc,
	dml2leaders map[string][]nodeInfo,
) error

RoundRobinPolicy do the query with multiple dml channels if request failed, it finds shard leader for failed dml channels

func SendReplicateMessagePack

func SendReplicateMessagePack(ctx context.Context, replicateMsgStream msgstream.MsgStream, request interface{ GetBase() *commonpb.MsgBase })

func SetPrivilegeCache

func SetPrivilegeCache(roleName, object, objectPrivilege string, isPermit bool, version int64)

func SetReportValue

func SetReportValue(status *commonpb.Status, value int)

func TraceLogInterceptor

func TraceLogInterceptor(ctx context.Context, req any, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error)

func UnaryServerHookInterceptor

func UnaryServerHookInterceptor() grpc.UnaryServerInterceptor

func UnaryServerInterceptor

func UnaryServerInterceptor(privilegeFunc PrivilegeFunc) grpc.UnaryServerInterceptor

UnaryServerInterceptor returns a new unary server interceptors that performs per-request privilege access.

func ValidateAutoIndexMmapConfig

func ValidateAutoIndexMmapConfig(isVectorField bool, indexParams map[string]string) error

func ValidateCollectionAlias

func ValidateCollectionAlias(collAlias string) error

ValidateCollectionAlias returns true if collAlias is a valid alias name for collection, otherwise returns false.

func ValidateDatabaseName

func ValidateDatabaseName(dbName string) error

func ValidateFieldAutoID

func ValidateFieldAutoID(coll *schemapb.CollectionSchema) error

ValidateFieldAutoID call after validatePrimaryKey

func ValidateObjectName

func ValidateObjectName(entity string) error

func ValidateObjectType

func ValidateObjectType(entity string) error

func ValidatePassword

func ValidatePassword(password string) error

func ValidatePrivilege

func ValidatePrivilege(entity string) error

func ValidatePrivilegeGroupName

func ValidatePrivilegeGroupName(groupName string) error

func ValidateResourceGroupName

func ValidateResourceGroupName(entity string) error

func ValidateRoleName

func ValidateRoleName(entity string) error

func ValidateUsername

func ValidateUsername(username string) error

func VerifyAPIKey

func VerifyAPIKey(rawToken string) (string, error)

Types

type AlterAliasTask

type AlterAliasTask struct {
	Condition
	*milvuspb.AlterAliasRequest
	// contains filtered or unexported fields
}

AlterAliasTask is the task to alter alias

func (*AlterAliasTask) BeginTs

func (t *AlterAliasTask) BeginTs() Timestamp

func (*AlterAliasTask) CanSkipAllocTimestamp

func (bt *AlterAliasTask) CanSkipAllocTimestamp() bool

func (*AlterAliasTask) EndTs

func (t *AlterAliasTask) EndTs() Timestamp

func (*AlterAliasTask) Execute

func (t *AlterAliasTask) Execute(ctx context.Context) error

func (*AlterAliasTask) GetDurationInQueue

func (bt *AlterAliasTask) GetDurationInQueue() time.Duration

func (*AlterAliasTask) ID

func (t *AlterAliasTask) ID() UniqueID

func (*AlterAliasTask) Name

func (t *AlterAliasTask) Name() string

func (*AlterAliasTask) OnEnqueue

func (t *AlterAliasTask) OnEnqueue() error

func (*AlterAliasTask) PostExecute

func (t *AlterAliasTask) PostExecute(ctx context.Context) error

func (*AlterAliasTask) PreExecute

func (t *AlterAliasTask) PreExecute(ctx context.Context) error

func (*AlterAliasTask) SetID

func (t *AlterAliasTask) SetID(uid UniqueID)

func (*AlterAliasTask) SetOnEnqueueTime

func (bt *AlterAliasTask) SetOnEnqueueTime()

func (*AlterAliasTask) SetTs

func (t *AlterAliasTask) SetTs(ts Timestamp)

func (*AlterAliasTask) TraceCtx

func (t *AlterAliasTask) TraceCtx() context.Context

func (*AlterAliasTask) Type

func (t *AlterAliasTask) Type() commonpb.MsgType

type BaseDeleteTask

type BaseDeleteTask = msgstream.DeleteMsg

type BaseInsertTask

type BaseInsertTask = msgstream.InsertMsg

type Cache

type Cache interface {
	// GetCollectionID get collection's id by name.
	GetCollectionID(ctx context.Context, database, collectionName string) (typeutil.UniqueID, error)
	// GetCollectionName get collection's name and database by id
	GetCollectionName(ctx context.Context, database string, collectionID int64) (string, error)
	// GetCollectionInfo get collection's information by name or collection id, such as schema, and etc.
	GetCollectionInfo(ctx context.Context, database, collectionName string, collectionID int64) (*collectionInfo, error)
	// GetPartitionID get partition's identifier of specific collection.
	GetPartitionID(ctx context.Context, database, collectionName string, partitionName string) (typeutil.UniqueID, error)
	// GetPartitions get all partitions' id of specific collection.
	GetPartitions(ctx context.Context, database, collectionName string) (map[string]typeutil.UniqueID, error)
	// GetPartitionInfo get partition's info.
	GetPartitionInfo(ctx context.Context, database, collectionName string, partitionName string) (*partitionInfo, error)
	// GetPartitionsIndex returns a partition names in partition key indexed order.
	GetPartitionsIndex(ctx context.Context, database, collectionName string) ([]string, error)
	// GetCollectionSchema get collection's schema.
	GetCollectionSchema(ctx context.Context, database, collectionName string) (*schemaInfo, error)
	GetShards(ctx context.Context, withCache bool, database, collectionName string, collectionID int64) (map[string][]nodeInfo, error)
	DeprecateShardCache(database, collectionName string)
	InvalidateShardLeaderCache(collections []int64)
	ListShardLocation() map[int64]nodeInfo
	RemoveCollection(ctx context.Context, database, collectionName string)
	RemoveCollectionsByID(ctx context.Context, collectionID UniqueID) []string

	// GetCredentialInfo operate credential cache
	GetCredentialInfo(ctx context.Context, username string) (*internalpb.CredentialInfo, error)
	RemoveCredential(username string)
	UpdateCredential(credInfo *internalpb.CredentialInfo)

	GetPrivilegeInfo(ctx context.Context) []string
	GetUserRole(username string) []string
	RefreshPolicyInfo(op typeutil.CacheOp) error
	InitPolicyInfo(info []string, userRoles []string)

	RemoveDatabase(ctx context.Context, database string)
	HasDatabase(ctx context.Context, database string) bool
	GetDatabaseInfo(ctx context.Context, database string) (*databaseInfo, error)
	// AllocID is only using on requests that need to skip timestamp allocation, don't overuse it.
	AllocID(ctx context.Context) (int64, error)
}

Cache is the interface for system meta data cache

type ChannelWorkload

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

type CollectionWorkLoad

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

type Condition

type Condition interface {
	WaitToFinish() error
	Notify(err error)
	Ctx() context.Context
}

Condition defines the interface of variable condition.

type CostMetrics

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

type CreateAliasTask

type CreateAliasTask struct {
	Condition
	*milvuspb.CreateAliasRequest
	// contains filtered or unexported fields
}

CreateAliasTask contains task information of CreateAlias

func (*CreateAliasTask) BeginTs

func (t *CreateAliasTask) BeginTs() Timestamp

BeginTs returns the ts

func (*CreateAliasTask) CanSkipAllocTimestamp

func (bt *CreateAliasTask) CanSkipAllocTimestamp() bool

func (*CreateAliasTask) EndTs

func (t *CreateAliasTask) EndTs() Timestamp

EndTs returns the ts

func (*CreateAliasTask) Execute

func (t *CreateAliasTask) Execute(ctx context.Context) error

Execute defines the tual execution of create alias

func (*CreateAliasTask) GetDurationInQueue

func (bt *CreateAliasTask) GetDurationInQueue() time.Duration

func (*CreateAliasTask) ID

func (t *CreateAliasTask) ID() UniqueID

ID return the id of the task

func (*CreateAliasTask) Name

func (t *CreateAliasTask) Name() string

Name returns the name of the task

func (*CreateAliasTask) OnEnqueue

func (t *CreateAliasTask) OnEnqueue() error

OnEnqueue defines the behavior task enqueued

func (*CreateAliasTask) PostExecute

func (t *CreateAliasTask) PostExecute(ctx context.Context) error

PostExecute defines the post execution, do nothing for create alias

func (*CreateAliasTask) PreExecute

func (t *CreateAliasTask) PreExecute(ctx context.Context) error

PreExecute defines the tion before task execution

func (*CreateAliasTask) SetID

func (t *CreateAliasTask) SetID(uid UniqueID)

SetID sets the id of the task

func (*CreateAliasTask) SetOnEnqueueTime

func (bt *CreateAliasTask) SetOnEnqueueTime()

func (*CreateAliasTask) SetTs

func (t *CreateAliasTask) SetTs(ts Timestamp)

SetTs sets the ts

func (*CreateAliasTask) TraceCtx

func (t *CreateAliasTask) TraceCtx() context.Context

TraceCtx returns the trace context of the task.

func (*CreateAliasTask) Type

func (t *CreateAliasTask) Type() commonpb.MsgType

Type returns the type of the task

type CreateResourceGroupTask

type CreateResourceGroupTask struct {
	Condition
	*milvuspb.CreateResourceGroupRequest
	// contains filtered or unexported fields
}

func (*CreateResourceGroupTask) BeginTs

func (t *CreateResourceGroupTask) BeginTs() Timestamp

func (*CreateResourceGroupTask) CanSkipAllocTimestamp

func (bt *CreateResourceGroupTask) CanSkipAllocTimestamp() bool

func (*CreateResourceGroupTask) EndTs

func (*CreateResourceGroupTask) Execute

func (t *CreateResourceGroupTask) Execute(ctx context.Context) error

func (*CreateResourceGroupTask) GetDurationInQueue

func (bt *CreateResourceGroupTask) GetDurationInQueue() time.Duration

func (*CreateResourceGroupTask) ID

func (*CreateResourceGroupTask) Name

func (t *CreateResourceGroupTask) Name() string

func (*CreateResourceGroupTask) OnEnqueue

func (t *CreateResourceGroupTask) OnEnqueue() error

func (*CreateResourceGroupTask) PostExecute

func (t *CreateResourceGroupTask) PostExecute(ctx context.Context) error

func (*CreateResourceGroupTask) PreExecute

func (t *CreateResourceGroupTask) PreExecute(ctx context.Context) error

func (*CreateResourceGroupTask) SetID

func (t *CreateResourceGroupTask) SetID(uid UniqueID)

func (*CreateResourceGroupTask) SetOnEnqueueTime

func (bt *CreateResourceGroupTask) SetOnEnqueueTime()

func (*CreateResourceGroupTask) SetTs

func (t *CreateResourceGroupTask) SetTs(ts Timestamp)

func (*CreateResourceGroupTask) TraceCtx

func (t *CreateResourceGroupTask) TraceCtx() context.Context

func (*CreateResourceGroupTask) Type

type DataCoord

type DataCoord interface {
	AssignSegmentID(ctx context.Context, req *datapb.AssignSegmentIDRequest, opts ...grpc.CallOption) (*datapb.AssignSegmentIDResponse, error)
}

DataCoord is a narrowed interface of DataCoordinator which only provide AssignSegmentID method

type DescribeAliasTask

type DescribeAliasTask struct {
	Condition

	*milvuspb.DescribeAliasRequest
	// contains filtered or unexported fields
}

DescribeAliasTask is the task to describe alias

func (*DescribeAliasTask) BeginTs

func (a *DescribeAliasTask) BeginTs() Timestamp

func (*DescribeAliasTask) CanSkipAllocTimestamp

func (bt *DescribeAliasTask) CanSkipAllocTimestamp() bool

func (*DescribeAliasTask) EndTs

func (a *DescribeAliasTask) EndTs() Timestamp

func (*DescribeAliasTask) Execute

func (a *DescribeAliasTask) Execute(ctx context.Context) error

func (*DescribeAliasTask) GetDurationInQueue

func (bt *DescribeAliasTask) GetDurationInQueue() time.Duration

func (*DescribeAliasTask) ID

func (a *DescribeAliasTask) ID() UniqueID

func (*DescribeAliasTask) Name

func (a *DescribeAliasTask) Name() string

func (*DescribeAliasTask) OnEnqueue

func (a *DescribeAliasTask) OnEnqueue() error

func (*DescribeAliasTask) PostExecute

func (a *DescribeAliasTask) PostExecute(ctx context.Context) error

func (*DescribeAliasTask) PreExecute

func (a *DescribeAliasTask) PreExecute(ctx context.Context) error

func (*DescribeAliasTask) SetID

func (a *DescribeAliasTask) SetID(uid UniqueID)

func (*DescribeAliasTask) SetOnEnqueueTime

func (bt *DescribeAliasTask) SetOnEnqueueTime()

func (*DescribeAliasTask) SetTs

func (a *DescribeAliasTask) SetTs(ts Timestamp)

func (*DescribeAliasTask) TraceCtx

func (a *DescribeAliasTask) TraceCtx() context.Context

func (*DescribeAliasTask) Type

type DescribeResourceGroupTask

type DescribeResourceGroupTask struct {
	Condition
	*milvuspb.DescribeResourceGroupRequest
	// contains filtered or unexported fields
}

func (*DescribeResourceGroupTask) BeginTs

func (t *DescribeResourceGroupTask) BeginTs() Timestamp

func (*DescribeResourceGroupTask) CanSkipAllocTimestamp

func (bt *DescribeResourceGroupTask) CanSkipAllocTimestamp() bool

func (*DescribeResourceGroupTask) EndTs

func (*DescribeResourceGroupTask) Execute

func (*DescribeResourceGroupTask) GetDurationInQueue

func (bt *DescribeResourceGroupTask) GetDurationInQueue() time.Duration

func (*DescribeResourceGroupTask) ID

func (*DescribeResourceGroupTask) Name

func (*DescribeResourceGroupTask) OnEnqueue

func (t *DescribeResourceGroupTask) OnEnqueue() error

func (*DescribeResourceGroupTask) PostExecute

func (t *DescribeResourceGroupTask) PostExecute(ctx context.Context) error

func (*DescribeResourceGroupTask) PreExecute

func (t *DescribeResourceGroupTask) PreExecute(ctx context.Context) error

func (*DescribeResourceGroupTask) SetID

func (t *DescribeResourceGroupTask) SetID(uid UniqueID)

func (*DescribeResourceGroupTask) SetOnEnqueueTime

func (bt *DescribeResourceGroupTask) SetOnEnqueueTime()

func (*DescribeResourceGroupTask) SetTs

func (t *DescribeResourceGroupTask) SetTs(ts Timestamp)

func (*DescribeResourceGroupTask) TraceCtx

func (*DescribeResourceGroupTask) Type

type DropAliasTask

type DropAliasTask struct {
	Condition
	*milvuspb.DropAliasRequest
	// contains filtered or unexported fields
}

DropAliasTask is the task to drop alias

func (*DropAliasTask) BeginTs

func (t *DropAliasTask) BeginTs() Timestamp

func (*DropAliasTask) CanSkipAllocTimestamp

func (bt *DropAliasTask) CanSkipAllocTimestamp() bool

func (*DropAliasTask) EndTs

func (t *DropAliasTask) EndTs() Timestamp

func (*DropAliasTask) Execute

func (t *DropAliasTask) Execute(ctx context.Context) error

func (*DropAliasTask) GetDurationInQueue

func (bt *DropAliasTask) GetDurationInQueue() time.Duration

func (*DropAliasTask) ID

func (t *DropAliasTask) ID() UniqueID

ID returns the MsgID

func (*DropAliasTask) Name

func (t *DropAliasTask) Name() string

Name returns the name of the task

func (*DropAliasTask) OnEnqueue

func (t *DropAliasTask) OnEnqueue() error

func (*DropAliasTask) PostExecute

func (t *DropAliasTask) PostExecute(ctx context.Context) error

func (*DropAliasTask) PreExecute

func (t *DropAliasTask) PreExecute(ctx context.Context) error

func (*DropAliasTask) SetID

func (t *DropAliasTask) SetID(uid UniqueID)

SetID sets the MsgID

func (*DropAliasTask) SetOnEnqueueTime

func (bt *DropAliasTask) SetOnEnqueueTime()

func (*DropAliasTask) SetTs

func (t *DropAliasTask) SetTs(ts Timestamp)

func (*DropAliasTask) TraceCtx

func (t *DropAliasTask) TraceCtx() context.Context

TraceCtx returns the context for trace

func (*DropAliasTask) Type

func (t *DropAliasTask) Type() commonpb.MsgType

type DropResourceGroupTask

type DropResourceGroupTask struct {
	Condition
	*milvuspb.DropResourceGroupRequest
	// contains filtered or unexported fields
}

func (*DropResourceGroupTask) BeginTs

func (t *DropResourceGroupTask) BeginTs() Timestamp

func (*DropResourceGroupTask) CanSkipAllocTimestamp

func (bt *DropResourceGroupTask) CanSkipAllocTimestamp() bool

func (*DropResourceGroupTask) EndTs

func (t *DropResourceGroupTask) EndTs() Timestamp

func (*DropResourceGroupTask) Execute

func (t *DropResourceGroupTask) Execute(ctx context.Context) error

func (*DropResourceGroupTask) GetDurationInQueue

func (bt *DropResourceGroupTask) GetDurationInQueue() time.Duration

func (*DropResourceGroupTask) ID

func (*DropResourceGroupTask) Name

func (t *DropResourceGroupTask) Name() string

func (*DropResourceGroupTask) OnEnqueue

func (t *DropResourceGroupTask) OnEnqueue() error

func (*DropResourceGroupTask) PostExecute

func (t *DropResourceGroupTask) PostExecute(ctx context.Context) error

func (*DropResourceGroupTask) PreExecute

func (t *DropResourceGroupTask) PreExecute(ctx context.Context) error

func (*DropResourceGroupTask) SetID

func (t *DropResourceGroupTask) SetID(uid UniqueID)

func (*DropResourceGroupTask) SetOnEnqueueTime

func (bt *DropResourceGroupTask) SetOnEnqueueTime()

func (*DropResourceGroupTask) SetTs

func (t *DropResourceGroupTask) SetTs(ts Timestamp)

func (*DropResourceGroupTask) TraceCtx

func (t *DropResourceGroupTask) TraceCtx() context.Context

func (*DropResourceGroupTask) Type

type Group

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

type LBBalancer

type LBBalancer interface {
	RegisterNodeInfo(nodeInfos []nodeInfo)
	SelectNode(ctx context.Context, availableNodes []int64, nq int64) (int64, error)
	CancelWorkload(node int64, nq int64)
	UpdateCostMetrics(node int64, cost *internalpb.CostAggregation)
	Start(ctx context.Context)
	Close()
}

type LBPolicy

type LBPolicy interface {
	Execute(ctx context.Context, workload CollectionWorkLoad) error
	ExecuteWithRetry(ctx context.Context, workload ChannelWorkload) error
	UpdateCostMetrics(node int64, cost *internalpb.CostAggregation)
	Start(ctx context.Context)
	Close()
}

type LBPolicyImpl

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

func NewLBPolicyImpl

func NewLBPolicyImpl(clientMgr shardClientMgr) *LBPolicyImpl

func (*LBPolicyImpl) Close

func (lb *LBPolicyImpl) Close()

func (*LBPolicyImpl) Execute

func (lb *LBPolicyImpl) Execute(ctx context.Context, workload CollectionWorkLoad) error

Execute will execute collection workload in parallel

func (*LBPolicyImpl) ExecuteWithRetry

func (lb *LBPolicyImpl) ExecuteWithRetry(ctx context.Context, workload ChannelWorkload) error

ExecuteWithRetry will choose a qn to execute the workload, and retry if failed, until reach the max retryTimes.

func (*LBPolicyImpl) GetShardLeaders

func (lb *LBPolicyImpl) GetShardLeaders(ctx context.Context, dbName string, collName string, collectionID int64, withCache bool) (map[string][]nodeInfo, error)

GetShardLeaders should always retry until ctx done, except the collection is not loaded.

func (*LBPolicyImpl) Start

func (lb *LBPolicyImpl) Start(ctx context.Context)

func (*LBPolicyImpl) UpdateCostMetrics

func (lb *LBPolicyImpl) UpdateCostMetrics(node int64, cost *internalpb.CostAggregation)

type ListAliasesTask

type ListAliasesTask struct {
	Condition

	*milvuspb.ListAliasesRequest
	// contains filtered or unexported fields
}

ListAliasesTask is the task to list aliases

func (*ListAliasesTask) BeginTs

func (a *ListAliasesTask) BeginTs() Timestamp

func (*ListAliasesTask) CanSkipAllocTimestamp

func (bt *ListAliasesTask) CanSkipAllocTimestamp() bool

func (*ListAliasesTask) EndTs

func (a *ListAliasesTask) EndTs() Timestamp

func (*ListAliasesTask) Execute

func (a *ListAliasesTask) Execute(ctx context.Context) error

func (*ListAliasesTask) GetDurationInQueue

func (bt *ListAliasesTask) GetDurationInQueue() time.Duration

func (*ListAliasesTask) ID

func (a *ListAliasesTask) ID() UniqueID

func (*ListAliasesTask) Name

func (a *ListAliasesTask) Name() string

func (*ListAliasesTask) OnEnqueue

func (a *ListAliasesTask) OnEnqueue() error

func (*ListAliasesTask) PostExecute

func (a *ListAliasesTask) PostExecute(ctx context.Context) error

func (*ListAliasesTask) PreExecute

func (a *ListAliasesTask) PreExecute(ctx context.Context) error

func (*ListAliasesTask) SetID

func (a *ListAliasesTask) SetID(uid UniqueID)

func (*ListAliasesTask) SetOnEnqueueTime

func (bt *ListAliasesTask) SetOnEnqueueTime()

func (*ListAliasesTask) SetTs

func (a *ListAliasesTask) SetTs(ts Timestamp)

func (*ListAliasesTask) TraceCtx

func (a *ListAliasesTask) TraceCtx() context.Context

func (*ListAliasesTask) Type

func (a *ListAliasesTask) Type() commonpb.MsgType

type ListResourceGroupsTask

type ListResourceGroupsTask struct {
	Condition
	*milvuspb.ListResourceGroupsRequest
	// contains filtered or unexported fields
}

func (*ListResourceGroupsTask) BeginTs

func (t *ListResourceGroupsTask) BeginTs() Timestamp

func (*ListResourceGroupsTask) CanSkipAllocTimestamp

func (bt *ListResourceGroupsTask) CanSkipAllocTimestamp() bool

func (*ListResourceGroupsTask) EndTs

func (t *ListResourceGroupsTask) EndTs() Timestamp

func (*ListResourceGroupsTask) Execute

func (t *ListResourceGroupsTask) Execute(ctx context.Context) error

func (*ListResourceGroupsTask) GetDurationInQueue

func (bt *ListResourceGroupsTask) GetDurationInQueue() time.Duration

func (*ListResourceGroupsTask) ID

func (*ListResourceGroupsTask) Name

func (t *ListResourceGroupsTask) Name() string

func (*ListResourceGroupsTask) OnEnqueue

func (t *ListResourceGroupsTask) OnEnqueue() error

func (*ListResourceGroupsTask) PostExecute

func (t *ListResourceGroupsTask) PostExecute(ctx context.Context) error

func (*ListResourceGroupsTask) PreExecute

func (t *ListResourceGroupsTask) PreExecute(ctx context.Context) error

func (*ListResourceGroupsTask) SetID

func (t *ListResourceGroupsTask) SetID(uid UniqueID)

func (*ListResourceGroupsTask) SetOnEnqueueTime

func (bt *ListResourceGroupsTask) SetOnEnqueueTime()

func (*ListResourceGroupsTask) SetTs

func (t *ListResourceGroupsTask) SetTs(ts Timestamp)

func (*ListResourceGroupsTask) TraceCtx

func (t *ListResourceGroupsTask) TraceCtx() context.Context

func (*ListResourceGroupsTask) Type

type LookAsideBalancer

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

func NewLookAsideBalancer

func NewLookAsideBalancer(clientMgr shardClientMgr) *LookAsideBalancer

func (*LookAsideBalancer) CancelWorkload

func (b *LookAsideBalancer) CancelWorkload(node int64, nq int64)

when task canceled, should reduce executing total nq cost

func (*LookAsideBalancer) Close

func (b *LookAsideBalancer) Close()

func (*LookAsideBalancer) RegisterNodeInfo

func (b *LookAsideBalancer) RegisterNodeInfo(nodeInfos []nodeInfo)

func (*LookAsideBalancer) SelectNode

func (b *LookAsideBalancer) SelectNode(ctx context.Context, availableNodes []int64, nq int64) (int64, error)

func (*LookAsideBalancer) Start

func (b *LookAsideBalancer) Start(ctx context.Context)

func (*LookAsideBalancer) UpdateCostMetrics

func (b *LookAsideBalancer) UpdateCostMetrics(node int64, cost *internalpb.CostAggregation)

UpdateCostMetrics used for cache some metrics of recent search/query cost

type MetaCache

type MetaCache struct {
	IDStart int64
	IDCount int64
	IDIndex int64
	IDLock  sync.RWMutex
	// contains filtered or unexported fields
}

MetaCache implements Cache, provides collection meta cache based on internal RootCoord

func NewMetaCache

func NewMetaCache(rootCoord types.RootCoordClient, queryCoord types.QueryCoordClient, shardMgr shardClientMgr) (*MetaCache, error)

NewMetaCache creates a MetaCache with provided RootCoord and QueryNode

func (*MetaCache) AllocID

func (m *MetaCache) AllocID(ctx context.Context) (int64, error)

func (*MetaCache) DeprecateShardCache

func (m *MetaCache) DeprecateShardCache(database, collectionName string)

DeprecateShardCache clear the shard leader cache of a collection

func (*MetaCache) GetCollectionID

func (m *MetaCache) GetCollectionID(ctx context.Context, database, collectionName string) (UniqueID, error)

GetCollectionID returns the corresponding collection id for provided collection name

func (*MetaCache) GetCollectionInfo

func (m *MetaCache) GetCollectionInfo(ctx context.Context, database string, collectionName string, collectionID int64) (*collectionInfo, error)

func (*MetaCache) GetCollectionName

func (m *MetaCache) GetCollectionName(ctx context.Context, database string, collectionID int64) (string, error)

GetCollectionName returns the corresponding collection name for provided collection id

func (*MetaCache) GetCollectionSchema

func (m *MetaCache) GetCollectionSchema(ctx context.Context, database, collectionName string) (*schemaInfo, error)

func (*MetaCache) GetCredentialInfo

func (m *MetaCache) GetCredentialInfo(ctx context.Context, username string) (*internalpb.CredentialInfo, error)

GetCredentialInfo returns the credential related to provided username If the cache missed, proxy will try to fetch from storage

func (*MetaCache) GetDatabaseInfo

func (m *MetaCache) GetDatabaseInfo(ctx context.Context, database string) (*databaseInfo, error)

func (*MetaCache) GetPartitionID

func (m *MetaCache) GetPartitionID(ctx context.Context, database, collectionName string, partitionName string) (typeutil.UniqueID, error)

func (*MetaCache) GetPartitionInfo

func (m *MetaCache) GetPartitionInfo(ctx context.Context, database, collectionName string, partitionName string) (*partitionInfo, error)

func (*MetaCache) GetPartitionInfos

func (m *MetaCache) GetPartitionInfos(ctx context.Context, database, collectionName string) (*partitionInfos, error)

func (*MetaCache) GetPartitions

func (m *MetaCache) GetPartitions(ctx context.Context, database, collectionName string) (map[string]typeutil.UniqueID, error)

func (*MetaCache) GetPartitionsIndex

func (m *MetaCache) GetPartitionsIndex(ctx context.Context, database, collectionName string) ([]string, error)

func (*MetaCache) GetPrivilegeInfo

func (m *MetaCache) GetPrivilegeInfo(ctx context.Context) []string

func (*MetaCache) GetShards

func (m *MetaCache) GetShards(ctx context.Context, withCache bool, database, collectionName string, collectionID int64) (map[string][]nodeInfo, error)

GetShards update cache if withCache == false

func (*MetaCache) GetUserRole

func (m *MetaCache) GetUserRole(user string) []string

func (*MetaCache) HasDatabase

func (m *MetaCache) HasDatabase(ctx context.Context, database string) bool

func (*MetaCache) InitPolicyInfo

func (m *MetaCache) InitPolicyInfo(info []string, userRoles []string)

func (*MetaCache) InvalidateShardLeaderCache

func (m *MetaCache) InvalidateShardLeaderCache(collections []int64)

InvalidateShardLeaderCache called when Shard leader balance happened

func (*MetaCache) ListShardLocation

func (m *MetaCache) ListShardLocation() map[int64]nodeInfo

used for Garbage collection shard client

func (*MetaCache) RefreshPolicyInfo

func (m *MetaCache) RefreshPolicyInfo(op typeutil.CacheOp) (err error)

func (*MetaCache) RemoveCollection

func (m *MetaCache) RemoveCollection(ctx context.Context, database, collectionName string)

func (*MetaCache) RemoveCollectionsByID

func (m *MetaCache) RemoveCollectionsByID(ctx context.Context, collectionID UniqueID) []string

func (*MetaCache) RemoveCredential

func (m *MetaCache) RemoveCredential(username string)

func (*MetaCache) RemoveDatabase

func (m *MetaCache) RemoveDatabase(ctx context.Context, database string)

func (*MetaCache) UpdateByID

func (m *MetaCache) UpdateByID(ctx context.Context, database string, collectionID UniqueID) (*collectionInfo, error)

func (*MetaCache) UpdateByName

func (m *MetaCache) UpdateByName(ctx context.Context, database, collectionName string) (*collectionInfo, error)

func (*MetaCache) UpdateCredential

func (m *MetaCache) UpdateCredential(credInfo *internalpb.CredentialInfo)

type MetaCacheCasbinAdapter

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

MetaCacheCasbinAdapter is the implementation of `persist.Adapter` with Cache Since the usage shall be read-only, it implements only `LoadPolicy` for now.

func NewMetaCacheCasbinAdapter

func NewMetaCacheCasbinAdapter(cacheSource func() Cache) *MetaCacheCasbinAdapter

func (*MetaCacheCasbinAdapter) AddPolicy

func (a *MetaCacheCasbinAdapter) AddPolicy(sec string, ptype string, rule []string) error

AddPolicy adds a policy rule to the storage. Implementing `persist.Adapter`. MetaCacheCasbinAdapter is read-only, always returns error

func (*MetaCacheCasbinAdapter) LoadPolicy

func (a *MetaCacheCasbinAdapter) LoadPolicy(model model.Model) error

LoadPolicy loads all policy rules from the storage. Implementing `persist.Adapter`.

func (*MetaCacheCasbinAdapter) RemoveFilteredPolicy

func (a *MetaCacheCasbinAdapter) RemoveFilteredPolicy(sec string, ptype string, fieldIndex int, fieldValues ...string) error

RemoveFilteredPolicy removes policy rules that match the filter from the storage. This is part of the Auto-Save feature.

func (*MetaCacheCasbinAdapter) RemovePolicy

func (a *MetaCacheCasbinAdapter) RemovePolicy(sec string, ptype string, rule []string) error

RemovePolicy removes a policy rule from the storage. Implementing `persist.Adapter`. MetaCacheCasbinAdapter is read-only, always returns error

func (*MetaCacheCasbinAdapter) SavePolicy

func (a *MetaCacheCasbinAdapter) SavePolicy(model model.Model) error

SavePolicy saves all policy rules to the storage. Implementing `persist.Adapter`. MetaCacheCasbinAdapter is read-only, always returns error

type MilvusPKType

type MilvusPKType interface{}

type MockCache

type MockCache struct {
	mock.Mock
}

MockCache is an autogenerated mock type for the Cache type

func NewMockCache

func NewMockCache(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockCache

NewMockCache creates a new instance of MockCache. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockCache) AllocID

func (_m *MockCache) AllocID(ctx context.Context) (int64, error)

AllocID provides a mock function with given fields: ctx

func (*MockCache) DeprecateShardCache

func (_m *MockCache) DeprecateShardCache(database string, collectionName string)

DeprecateShardCache provides a mock function with given fields: database, collectionName

func (*MockCache) EXPECT

func (_m *MockCache) EXPECT() *MockCache_Expecter

func (*MockCache) GetCollectionID

func (_m *MockCache) GetCollectionID(ctx context.Context, database string, collectionName string) (int64, error)

GetCollectionID provides a mock function with given fields: ctx, database, collectionName

func (*MockCache) GetCollectionInfo

func (_m *MockCache) GetCollectionInfo(ctx context.Context, database string, collectionName string, collectionID int64) (*collectionInfo, error)

GetCollectionInfo provides a mock function with given fields: ctx, database, collectionName, collectionID

func (*MockCache) GetCollectionName

func (_m *MockCache) GetCollectionName(ctx context.Context, database string, collectionID int64) (string, error)

GetCollectionName provides a mock function with given fields: ctx, database, collectionID

func (*MockCache) GetCollectionSchema

func (_m *MockCache) GetCollectionSchema(ctx context.Context, database string, collectionName string) (*schemaInfo, error)

GetCollectionSchema provides a mock function with given fields: ctx, database, collectionName

func (*MockCache) GetCredentialInfo

func (_m *MockCache) GetCredentialInfo(ctx context.Context, username string) (*internalpb.CredentialInfo, error)

GetCredentialInfo provides a mock function with given fields: ctx, username

func (*MockCache) GetDatabaseInfo

func (_m *MockCache) GetDatabaseInfo(ctx context.Context, database string) (*databaseInfo, error)

GetDatabaseInfo provides a mock function with given fields: ctx, database

func (*MockCache) GetPartitionID

func (_m *MockCache) GetPartitionID(ctx context.Context, database string, collectionName string, partitionName string) (int64, error)

GetPartitionID provides a mock function with given fields: ctx, database, collectionName, partitionName

func (*MockCache) GetPartitionInfo

func (_m *MockCache) GetPartitionInfo(ctx context.Context, database string, collectionName string, partitionName string) (*partitionInfo, error)

GetPartitionInfo provides a mock function with given fields: ctx, database, collectionName, partitionName

func (*MockCache) GetPartitions

func (_m *MockCache) GetPartitions(ctx context.Context, database string, collectionName string) (map[string]int64, error)

GetPartitions provides a mock function with given fields: ctx, database, collectionName

func (*MockCache) GetPartitionsIndex

func (_m *MockCache) GetPartitionsIndex(ctx context.Context, database string, collectionName string) ([]string, error)

GetPartitionsIndex provides a mock function with given fields: ctx, database, collectionName

func (*MockCache) GetPrivilegeInfo

func (_m *MockCache) GetPrivilegeInfo(ctx context.Context) []string

GetPrivilegeInfo provides a mock function with given fields: ctx

func (*MockCache) GetShards

func (_m *MockCache) GetShards(ctx context.Context, withCache bool, database string, collectionName string, collectionID int64) (map[string][]nodeInfo, error)

GetShards provides a mock function with given fields: ctx, withCache, database, collectionName, collectionID

func (*MockCache) GetUserRole

func (_m *MockCache) GetUserRole(username string) []string

GetUserRole provides a mock function with given fields: username

func (*MockCache) HasDatabase

func (_m *MockCache) HasDatabase(ctx context.Context, database string) bool

HasDatabase provides a mock function with given fields: ctx, database

func (*MockCache) InitPolicyInfo

func (_m *MockCache) InitPolicyInfo(info []string, userRoles []string)

InitPolicyInfo provides a mock function with given fields: info, userRoles

func (*MockCache) InvalidateShardLeaderCache

func (_m *MockCache) InvalidateShardLeaderCache(collections []int64)

InvalidateShardLeaderCache provides a mock function with given fields: collections

func (*MockCache) ListShardLocation

func (_m *MockCache) ListShardLocation() map[int64]nodeInfo

ListShardLocation provides a mock function with given fields:

func (*MockCache) RefreshPolicyInfo

func (_m *MockCache) RefreshPolicyInfo(op typeutil.CacheOp) error

RefreshPolicyInfo provides a mock function with given fields: op

func (*MockCache) RemoveCollection

func (_m *MockCache) RemoveCollection(ctx context.Context, database string, collectionName string)

RemoveCollection provides a mock function with given fields: ctx, database, collectionName

func (*MockCache) RemoveCollectionsByID

func (_m *MockCache) RemoveCollectionsByID(ctx context.Context, collectionID int64) []string

RemoveCollectionsByID provides a mock function with given fields: ctx, collectionID

func (*MockCache) RemoveCredential

func (_m *MockCache) RemoveCredential(username string)

RemoveCredential provides a mock function with given fields: username

func (*MockCache) RemoveDatabase

func (_m *MockCache) RemoveDatabase(ctx context.Context, database string)

RemoveDatabase provides a mock function with given fields: ctx, database

func (*MockCache) UpdateCredential

func (_m *MockCache) UpdateCredential(credInfo *internalpb.CredentialInfo)

UpdateCredential provides a mock function with given fields: credInfo

type MockCache_AllocID_Call

type MockCache_AllocID_Call struct {
	*mock.Call
}

MockCache_AllocID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AllocID'

func (*MockCache_AllocID_Call) Return

func (*MockCache_AllocID_Call) Run

func (*MockCache_AllocID_Call) RunAndReturn

func (_c *MockCache_AllocID_Call) RunAndReturn(run func(context.Context) (int64, error)) *MockCache_AllocID_Call

type MockCache_DeprecateShardCache_Call

type MockCache_DeprecateShardCache_Call struct {
	*mock.Call
}

MockCache_DeprecateShardCache_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeprecateShardCache'

func (*MockCache_DeprecateShardCache_Call) Return

func (*MockCache_DeprecateShardCache_Call) Run

func (_c *MockCache_DeprecateShardCache_Call) Run(run func(database string, collectionName string)) *MockCache_DeprecateShardCache_Call

func (*MockCache_DeprecateShardCache_Call) RunAndReturn

type MockCache_Expecter

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

func (*MockCache_Expecter) AllocID

func (_e *MockCache_Expecter) AllocID(ctx interface{}) *MockCache_AllocID_Call

AllocID is a helper method to define mock.On call

  • ctx context.Context

func (*MockCache_Expecter) DeprecateShardCache

func (_e *MockCache_Expecter) DeprecateShardCache(database interface{}, collectionName interface{}) *MockCache_DeprecateShardCache_Call

DeprecateShardCache is a helper method to define mock.On call

  • database string
  • collectionName string

func (*MockCache_Expecter) GetCollectionID

func (_e *MockCache_Expecter) GetCollectionID(ctx interface{}, database interface{}, collectionName interface{}) *MockCache_GetCollectionID_Call

GetCollectionID is a helper method to define mock.On call

  • ctx context.Context
  • database string
  • collectionName string

func (*MockCache_Expecter) GetCollectionInfo

func (_e *MockCache_Expecter) GetCollectionInfo(ctx interface{}, database interface{}, collectionName interface{}, collectionID interface{}) *MockCache_GetCollectionInfo_Call

GetCollectionInfo is a helper method to define mock.On call

  • ctx context.Context
  • database string
  • collectionName string
  • collectionID int64

func (*MockCache_Expecter) GetCollectionName

func (_e *MockCache_Expecter) GetCollectionName(ctx interface{}, database interface{}, collectionID interface{}) *MockCache_GetCollectionName_Call

GetCollectionName is a helper method to define mock.On call

  • ctx context.Context
  • database string
  • collectionID int64

func (*MockCache_Expecter) GetCollectionSchema

func (_e *MockCache_Expecter) GetCollectionSchema(ctx interface{}, database interface{}, collectionName interface{}) *MockCache_GetCollectionSchema_Call

GetCollectionSchema is a helper method to define mock.On call

  • ctx context.Context
  • database string
  • collectionName string

func (*MockCache_Expecter) GetCredentialInfo

func (_e *MockCache_Expecter) GetCredentialInfo(ctx interface{}, username interface{}) *MockCache_GetCredentialInfo_Call

GetCredentialInfo is a helper method to define mock.On call

  • ctx context.Context
  • username string

func (*MockCache_Expecter) GetDatabaseInfo

func (_e *MockCache_Expecter) GetDatabaseInfo(ctx interface{}, database interface{}) *MockCache_GetDatabaseInfo_Call

GetDatabaseInfo is a helper method to define mock.On call

  • ctx context.Context
  • database string

func (*MockCache_Expecter) GetPartitionID

func (_e *MockCache_Expecter) GetPartitionID(ctx interface{}, database interface{}, collectionName interface{}, partitionName interface{}) *MockCache_GetPartitionID_Call

GetPartitionID is a helper method to define mock.On call

  • ctx context.Context
  • database string
  • collectionName string
  • partitionName string

func (*MockCache_Expecter) GetPartitionInfo

func (_e *MockCache_Expecter) GetPartitionInfo(ctx interface{}, database interface{}, collectionName interface{}, partitionName interface{}) *MockCache_GetPartitionInfo_Call

GetPartitionInfo is a helper method to define mock.On call

  • ctx context.Context
  • database string
  • collectionName string
  • partitionName string

func (*MockCache_Expecter) GetPartitions

func (_e *MockCache_Expecter) GetPartitions(ctx interface{}, database interface{}, collectionName interface{}) *MockCache_GetPartitions_Call

GetPartitions is a helper method to define mock.On call

  • ctx context.Context
  • database string
  • collectionName string

func (*MockCache_Expecter) GetPartitionsIndex

func (_e *MockCache_Expecter) GetPartitionsIndex(ctx interface{}, database interface{}, collectionName interface{}) *MockCache_GetPartitionsIndex_Call

GetPartitionsIndex is a helper method to define mock.On call

  • ctx context.Context
  • database string
  • collectionName string

func (*MockCache_Expecter) GetPrivilegeInfo

func (_e *MockCache_Expecter) GetPrivilegeInfo(ctx interface{}) *MockCache_GetPrivilegeInfo_Call

GetPrivilegeInfo is a helper method to define mock.On call

  • ctx context.Context

func (*MockCache_Expecter) GetShards

func (_e *MockCache_Expecter) GetShards(ctx interface{}, withCache interface{}, database interface{}, collectionName interface{}, collectionID interface{}) *MockCache_GetShards_Call

GetShards is a helper method to define mock.On call

  • ctx context.Context
  • withCache bool
  • database string
  • collectionName string
  • collectionID int64

func (*MockCache_Expecter) GetUserRole

func (_e *MockCache_Expecter) GetUserRole(username interface{}) *MockCache_GetUserRole_Call

GetUserRole is a helper method to define mock.On call

  • username string

func (*MockCache_Expecter) HasDatabase

func (_e *MockCache_Expecter) HasDatabase(ctx interface{}, database interface{}) *MockCache_HasDatabase_Call

HasDatabase is a helper method to define mock.On call

  • ctx context.Context
  • database string

func (*MockCache_Expecter) InitPolicyInfo

func (_e *MockCache_Expecter) InitPolicyInfo(info interface{}, userRoles interface{}) *MockCache_InitPolicyInfo_Call

InitPolicyInfo is a helper method to define mock.On call

  • info []string
  • userRoles []string

func (*MockCache_Expecter) InvalidateShardLeaderCache

func (_e *MockCache_Expecter) InvalidateShardLeaderCache(collections interface{}) *MockCache_InvalidateShardLeaderCache_Call

InvalidateShardLeaderCache is a helper method to define mock.On call

  • collections []int64

func (*MockCache_Expecter) ListShardLocation

func (_e *MockCache_Expecter) ListShardLocation() *MockCache_ListShardLocation_Call

ListShardLocation is a helper method to define mock.On call

func (*MockCache_Expecter) RefreshPolicyInfo

func (_e *MockCache_Expecter) RefreshPolicyInfo(op interface{}) *MockCache_RefreshPolicyInfo_Call

RefreshPolicyInfo is a helper method to define mock.On call

  • op typeutil.CacheOp

func (*MockCache_Expecter) RemoveCollection

func (_e *MockCache_Expecter) RemoveCollection(ctx interface{}, database interface{}, collectionName interface{}) *MockCache_RemoveCollection_Call

RemoveCollection is a helper method to define mock.On call

  • ctx context.Context
  • database string
  • collectionName string

func (*MockCache_Expecter) RemoveCollectionsByID

func (_e *MockCache_Expecter) RemoveCollectionsByID(ctx interface{}, collectionID interface{}) *MockCache_RemoveCollectionsByID_Call

RemoveCollectionsByID is a helper method to define mock.On call

  • ctx context.Context
  • collectionID int64

func (*MockCache_Expecter) RemoveCredential

func (_e *MockCache_Expecter) RemoveCredential(username interface{}) *MockCache_RemoveCredential_Call

RemoveCredential is a helper method to define mock.On call

  • username string

func (*MockCache_Expecter) RemoveDatabase

func (_e *MockCache_Expecter) RemoveDatabase(ctx interface{}, database interface{}) *MockCache_RemoveDatabase_Call

RemoveDatabase is a helper method to define mock.On call

  • ctx context.Context
  • database string

func (*MockCache_Expecter) UpdateCredential

func (_e *MockCache_Expecter) UpdateCredential(credInfo interface{}) *MockCache_UpdateCredential_Call

UpdateCredential is a helper method to define mock.On call

  • credInfo *internalpb.CredentialInfo

type MockCache_GetCollectionID_Call

type MockCache_GetCollectionID_Call struct {
	*mock.Call
}

MockCache_GetCollectionID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetCollectionID'

func (*MockCache_GetCollectionID_Call) Return

func (*MockCache_GetCollectionID_Call) Run

func (_c *MockCache_GetCollectionID_Call) Run(run func(ctx context.Context, database string, collectionName string)) *MockCache_GetCollectionID_Call

func (*MockCache_GetCollectionID_Call) RunAndReturn

type MockCache_GetCollectionInfo_Call

type MockCache_GetCollectionInfo_Call struct {
	*mock.Call
}

MockCache_GetCollectionInfo_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetCollectionInfo'

func (*MockCache_GetCollectionInfo_Call) Return

func (_c *MockCache_GetCollectionInfo_Call) Return(_a0 *collectionInfo, _a1 error) *MockCache_GetCollectionInfo_Call

func (*MockCache_GetCollectionInfo_Call) Run

func (_c *MockCache_GetCollectionInfo_Call) Run(run func(ctx context.Context, database string, collectionName string, collectionID int64)) *MockCache_GetCollectionInfo_Call

func (*MockCache_GetCollectionInfo_Call) RunAndReturn

func (_c *MockCache_GetCollectionInfo_Call) RunAndReturn(run func(context.Context, string, string, int64) (*collectionInfo, error)) *MockCache_GetCollectionInfo_Call

type MockCache_GetCollectionName_Call

type MockCache_GetCollectionName_Call struct {
	*mock.Call
}

MockCache_GetCollectionName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetCollectionName'

func (*MockCache_GetCollectionName_Call) Return

func (*MockCache_GetCollectionName_Call) Run

func (_c *MockCache_GetCollectionName_Call) Run(run func(ctx context.Context, database string, collectionID int64)) *MockCache_GetCollectionName_Call

func (*MockCache_GetCollectionName_Call) RunAndReturn

type MockCache_GetCollectionSchema_Call

type MockCache_GetCollectionSchema_Call struct {
	*mock.Call
}

MockCache_GetCollectionSchema_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetCollectionSchema'

func (*MockCache_GetCollectionSchema_Call) Return

func (*MockCache_GetCollectionSchema_Call) Run

func (_c *MockCache_GetCollectionSchema_Call) Run(run func(ctx context.Context, database string, collectionName string)) *MockCache_GetCollectionSchema_Call

func (*MockCache_GetCollectionSchema_Call) RunAndReturn

type MockCache_GetCredentialInfo_Call

type MockCache_GetCredentialInfo_Call struct {
	*mock.Call
}

MockCache_GetCredentialInfo_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetCredentialInfo'

func (*MockCache_GetCredentialInfo_Call) Return

func (*MockCache_GetCredentialInfo_Call) Run

func (*MockCache_GetCredentialInfo_Call) RunAndReturn

type MockCache_GetDatabaseInfo_Call

type MockCache_GetDatabaseInfo_Call struct {
	*mock.Call
}

MockCache_GetDatabaseInfo_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetDatabaseInfo'

func (*MockCache_GetDatabaseInfo_Call) Return

func (_c *MockCache_GetDatabaseInfo_Call) Return(_a0 *databaseInfo, _a1 error) *MockCache_GetDatabaseInfo_Call

func (*MockCache_GetDatabaseInfo_Call) Run

func (*MockCache_GetDatabaseInfo_Call) RunAndReturn

func (_c *MockCache_GetDatabaseInfo_Call) RunAndReturn(run func(context.Context, string) (*databaseInfo, error)) *MockCache_GetDatabaseInfo_Call

type MockCache_GetPartitionID_Call

type MockCache_GetPartitionID_Call struct {
	*mock.Call
}

MockCache_GetPartitionID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPartitionID'

func (*MockCache_GetPartitionID_Call) Return

func (*MockCache_GetPartitionID_Call) Run

func (_c *MockCache_GetPartitionID_Call) Run(run func(ctx context.Context, database string, collectionName string, partitionName string)) *MockCache_GetPartitionID_Call

func (*MockCache_GetPartitionID_Call) RunAndReturn

type MockCache_GetPartitionInfo_Call

type MockCache_GetPartitionInfo_Call struct {
	*mock.Call
}

MockCache_GetPartitionInfo_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPartitionInfo'

func (*MockCache_GetPartitionInfo_Call) Return

func (_c *MockCache_GetPartitionInfo_Call) Return(_a0 *partitionInfo, _a1 error) *MockCache_GetPartitionInfo_Call

func (*MockCache_GetPartitionInfo_Call) Run

func (_c *MockCache_GetPartitionInfo_Call) Run(run func(ctx context.Context, database string, collectionName string, partitionName string)) *MockCache_GetPartitionInfo_Call

func (*MockCache_GetPartitionInfo_Call) RunAndReturn

func (_c *MockCache_GetPartitionInfo_Call) RunAndReturn(run func(context.Context, string, string, string) (*partitionInfo, error)) *MockCache_GetPartitionInfo_Call

type MockCache_GetPartitionsIndex_Call

type MockCache_GetPartitionsIndex_Call struct {
	*mock.Call
}

MockCache_GetPartitionsIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPartitionsIndex'

func (*MockCache_GetPartitionsIndex_Call) Return

func (*MockCache_GetPartitionsIndex_Call) Run

func (_c *MockCache_GetPartitionsIndex_Call) Run(run func(ctx context.Context, database string, collectionName string)) *MockCache_GetPartitionsIndex_Call

func (*MockCache_GetPartitionsIndex_Call) RunAndReturn

type MockCache_GetPartitions_Call

type MockCache_GetPartitions_Call struct {
	*mock.Call
}

MockCache_GetPartitions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPartitions'

func (*MockCache_GetPartitions_Call) Return

func (*MockCache_GetPartitions_Call) Run

func (_c *MockCache_GetPartitions_Call) Run(run func(ctx context.Context, database string, collectionName string)) *MockCache_GetPartitions_Call

func (*MockCache_GetPartitions_Call) RunAndReturn

type MockCache_GetPrivilegeInfo_Call

type MockCache_GetPrivilegeInfo_Call struct {
	*mock.Call
}

MockCache_GetPrivilegeInfo_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPrivilegeInfo'

func (*MockCache_GetPrivilegeInfo_Call) Return

func (*MockCache_GetPrivilegeInfo_Call) Run

func (*MockCache_GetPrivilegeInfo_Call) RunAndReturn

type MockCache_GetShards_Call

type MockCache_GetShards_Call struct {
	*mock.Call
}

MockCache_GetShards_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetShards'

func (*MockCache_GetShards_Call) Return

func (_c *MockCache_GetShards_Call) Return(_a0 map[string][]nodeInfo, _a1 error) *MockCache_GetShards_Call

func (*MockCache_GetShards_Call) Run

func (_c *MockCache_GetShards_Call) Run(run func(ctx context.Context, withCache bool, database string, collectionName string, collectionID int64)) *MockCache_GetShards_Call

func (*MockCache_GetShards_Call) RunAndReturn

func (_c *MockCache_GetShards_Call) RunAndReturn(run func(context.Context, bool, string, string, int64) (map[string][]nodeInfo, error)) *MockCache_GetShards_Call

type MockCache_GetUserRole_Call

type MockCache_GetUserRole_Call struct {
	*mock.Call
}

MockCache_GetUserRole_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetUserRole'

func (*MockCache_GetUserRole_Call) Return

func (*MockCache_GetUserRole_Call) Run

func (_c *MockCache_GetUserRole_Call) Run(run func(username string)) *MockCache_GetUserRole_Call

func (*MockCache_GetUserRole_Call) RunAndReturn

func (_c *MockCache_GetUserRole_Call) RunAndReturn(run func(string) []string) *MockCache_GetUserRole_Call

type MockCache_HasDatabase_Call

type MockCache_HasDatabase_Call struct {
	*mock.Call
}

MockCache_HasDatabase_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HasDatabase'

func (*MockCache_HasDatabase_Call) Return

func (*MockCache_HasDatabase_Call) Run

func (*MockCache_HasDatabase_Call) RunAndReturn

type MockCache_InitPolicyInfo_Call

type MockCache_InitPolicyInfo_Call struct {
	*mock.Call
}

MockCache_InitPolicyInfo_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'InitPolicyInfo'

func (*MockCache_InitPolicyInfo_Call) Return

func (*MockCache_InitPolicyInfo_Call) Run

func (_c *MockCache_InitPolicyInfo_Call) Run(run func(info []string, userRoles []string)) *MockCache_InitPolicyInfo_Call

func (*MockCache_InitPolicyInfo_Call) RunAndReturn

type MockCache_InvalidateShardLeaderCache_Call

type MockCache_InvalidateShardLeaderCache_Call struct {
	*mock.Call
}

MockCache_InvalidateShardLeaderCache_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'InvalidateShardLeaderCache'

func (*MockCache_InvalidateShardLeaderCache_Call) Return

func (*MockCache_InvalidateShardLeaderCache_Call) Run

func (*MockCache_InvalidateShardLeaderCache_Call) RunAndReturn

type MockCache_ListShardLocation_Call

type MockCache_ListShardLocation_Call struct {
	*mock.Call
}

MockCache_ListShardLocation_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListShardLocation'

func (*MockCache_ListShardLocation_Call) Return

func (*MockCache_ListShardLocation_Call) Run

func (*MockCache_ListShardLocation_Call) RunAndReturn

func (_c *MockCache_ListShardLocation_Call) RunAndReturn(run func() map[int64]nodeInfo) *MockCache_ListShardLocation_Call

type MockCache_RefreshPolicyInfo_Call

type MockCache_RefreshPolicyInfo_Call struct {
	*mock.Call
}

MockCache_RefreshPolicyInfo_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RefreshPolicyInfo'

func (*MockCache_RefreshPolicyInfo_Call) Return

func (*MockCache_RefreshPolicyInfo_Call) Run

func (*MockCache_RefreshPolicyInfo_Call) RunAndReturn

type MockCache_RemoveCollection_Call

type MockCache_RemoveCollection_Call struct {
	*mock.Call
}

MockCache_RemoveCollection_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveCollection'

func (*MockCache_RemoveCollection_Call) Return

func (*MockCache_RemoveCollection_Call) Run

func (_c *MockCache_RemoveCollection_Call) Run(run func(ctx context.Context, database string, collectionName string)) *MockCache_RemoveCollection_Call

func (*MockCache_RemoveCollection_Call) RunAndReturn

type MockCache_RemoveCollectionsByID_Call

type MockCache_RemoveCollectionsByID_Call struct {
	*mock.Call
}

MockCache_RemoveCollectionsByID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveCollectionsByID'

func (*MockCache_RemoveCollectionsByID_Call) Return

func (*MockCache_RemoveCollectionsByID_Call) Run

func (*MockCache_RemoveCollectionsByID_Call) RunAndReturn

type MockCache_RemoveCredential_Call

type MockCache_RemoveCredential_Call struct {
	*mock.Call
}

MockCache_RemoveCredential_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveCredential'

func (*MockCache_RemoveCredential_Call) Return

func (*MockCache_RemoveCredential_Call) Run

func (*MockCache_RemoveCredential_Call) RunAndReturn

type MockCache_RemoveDatabase_Call

type MockCache_RemoveDatabase_Call struct {
	*mock.Call
}

MockCache_RemoveDatabase_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveDatabase'

func (*MockCache_RemoveDatabase_Call) Return

func (*MockCache_RemoveDatabase_Call) Run

func (*MockCache_RemoveDatabase_Call) RunAndReturn

type MockCache_UpdateCredential_Call

type MockCache_UpdateCredential_Call struct {
	*mock.Call
}

MockCache_UpdateCredential_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateCredential'

func (*MockCache_UpdateCredential_Call) Return

func (*MockCache_UpdateCredential_Call) Run

func (*MockCache_UpdateCredential_Call) RunAndReturn

type MockChannelsMgr

type MockChannelsMgr struct {
	mock.Mock
}

MockChannelsMgr is an autogenerated mock type for the channelsMgr type

func NewMockChannelsMgr

func NewMockChannelsMgr(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockChannelsMgr

NewMockChannelsMgr creates a new instance of MockChannelsMgr. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockChannelsMgr) EXPECT

type MockChannelsMgr_Expecter

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

type MockChannelsMgr_getChannels_Call

type MockChannelsMgr_getChannels_Call struct {
	*mock.Call
}

MockChannelsMgr_getChannels_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'getChannels'

func (*MockChannelsMgr_getChannels_Call) Return

func (*MockChannelsMgr_getChannels_Call) Run

func (*MockChannelsMgr_getChannels_Call) RunAndReturn

type MockChannelsMgr_getOrCreateDmlStream_Call

type MockChannelsMgr_getOrCreateDmlStream_Call struct {
	*mock.Call
}

MockChannelsMgr_getOrCreateDmlStream_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'getOrCreateDmlStream'

func (*MockChannelsMgr_getOrCreateDmlStream_Call) Return

func (*MockChannelsMgr_getOrCreateDmlStream_Call) Run

func (*MockChannelsMgr_getOrCreateDmlStream_Call) RunAndReturn

type MockChannelsMgr_getVChannels_Call

type MockChannelsMgr_getVChannels_Call struct {
	*mock.Call
}

MockChannelsMgr_getVChannels_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'getVChannels'

func (*MockChannelsMgr_getVChannels_Call) Return

func (*MockChannelsMgr_getVChannels_Call) Run

func (*MockChannelsMgr_getVChannels_Call) RunAndReturn

type MockChannelsMgr_removeAllDMLStream_Call

type MockChannelsMgr_removeAllDMLStream_Call struct {
	*mock.Call
}

MockChannelsMgr_removeAllDMLStream_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'removeAllDMLStream'

func (*MockChannelsMgr_removeAllDMLStream_Call) Return

func (*MockChannelsMgr_removeAllDMLStream_Call) Run

func (*MockChannelsMgr_removeAllDMLStream_Call) RunAndReturn

type MockChannelsMgr_removeDMLStream_Call

type MockChannelsMgr_removeDMLStream_Call struct {
	*mock.Call
}

MockChannelsMgr_removeDMLStream_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'removeDMLStream'

func (*MockChannelsMgr_removeDMLStream_Call) Return

func (*MockChannelsMgr_removeDMLStream_Call) Run

func (*MockChannelsMgr_removeDMLStream_Call) RunAndReturn

type MockLBBalancer

type MockLBBalancer struct {
	mock.Mock
}

MockLBBalancer is an autogenerated mock type for the LBBalancer type

func NewMockLBBalancer

func NewMockLBBalancer(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockLBBalancer

NewMockLBBalancer creates a new instance of MockLBBalancer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockLBBalancer) CancelWorkload

func (_m *MockLBBalancer) CancelWorkload(node int64, nq int64)

CancelWorkload provides a mock function with given fields: node, nq

func (*MockLBBalancer) Close

func (_m *MockLBBalancer) Close()

Close provides a mock function with given fields:

func (*MockLBBalancer) EXPECT

func (*MockLBBalancer) RegisterNodeInfo

func (_m *MockLBBalancer) RegisterNodeInfo(nodeInfos []nodeInfo)

RegisterNodeInfo provides a mock function with given fields: nodeInfos

func (*MockLBBalancer) SelectNode

func (_m *MockLBBalancer) SelectNode(ctx context.Context, availableNodes []int64, nq int64) (int64, error)

SelectNode provides a mock function with given fields: ctx, availableNodes, nq

func (*MockLBBalancer) Start

func (_m *MockLBBalancer) Start(ctx context.Context)

Start provides a mock function with given fields: ctx

func (*MockLBBalancer) UpdateCostMetrics

func (_m *MockLBBalancer) UpdateCostMetrics(node int64, cost *internalpb.CostAggregation)

UpdateCostMetrics provides a mock function with given fields: node, cost

type MockLBBalancer_CancelWorkload_Call

type MockLBBalancer_CancelWorkload_Call struct {
	*mock.Call
}

MockLBBalancer_CancelWorkload_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CancelWorkload'

func (*MockLBBalancer_CancelWorkload_Call) Return

func (*MockLBBalancer_CancelWorkload_Call) Run

func (*MockLBBalancer_CancelWorkload_Call) RunAndReturn

type MockLBBalancer_Close_Call

type MockLBBalancer_Close_Call struct {
	*mock.Call
}

MockLBBalancer_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close'

func (*MockLBBalancer_Close_Call) Return

func (*MockLBBalancer_Close_Call) Run

func (*MockLBBalancer_Close_Call) RunAndReturn

func (_c *MockLBBalancer_Close_Call) RunAndReturn(run func()) *MockLBBalancer_Close_Call

type MockLBBalancer_Expecter

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

func (*MockLBBalancer_Expecter) CancelWorkload

func (_e *MockLBBalancer_Expecter) CancelWorkload(node interface{}, nq interface{}) *MockLBBalancer_CancelWorkload_Call

CancelWorkload is a helper method to define mock.On call

  • node int64
  • nq int64

func (*MockLBBalancer_Expecter) Close

Close is a helper method to define mock.On call

func (*MockLBBalancer_Expecter) RegisterNodeInfo

func (_e *MockLBBalancer_Expecter) RegisterNodeInfo(nodeInfos interface{}) *MockLBBalancer_RegisterNodeInfo_Call

RegisterNodeInfo is a helper method to define mock.On call

  • nodeInfos []nodeInfo

func (*MockLBBalancer_Expecter) SelectNode

func (_e *MockLBBalancer_Expecter) SelectNode(ctx interface{}, availableNodes interface{}, nq interface{}) *MockLBBalancer_SelectNode_Call

SelectNode is a helper method to define mock.On call

  • ctx context.Context
  • availableNodes []int64
  • nq int64

func (*MockLBBalancer_Expecter) Start

func (_e *MockLBBalancer_Expecter) Start(ctx interface{}) *MockLBBalancer_Start_Call

Start is a helper method to define mock.On call

  • ctx context.Context

func (*MockLBBalancer_Expecter) UpdateCostMetrics

func (_e *MockLBBalancer_Expecter) UpdateCostMetrics(node interface{}, cost interface{}) *MockLBBalancer_UpdateCostMetrics_Call

UpdateCostMetrics is a helper method to define mock.On call

  • node int64
  • cost *internalpb.CostAggregation

type MockLBBalancer_RegisterNodeInfo_Call

type MockLBBalancer_RegisterNodeInfo_Call struct {
	*mock.Call
}

MockLBBalancer_RegisterNodeInfo_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RegisterNodeInfo'

func (*MockLBBalancer_RegisterNodeInfo_Call) Return

func (*MockLBBalancer_RegisterNodeInfo_Call) Run

func (_c *MockLBBalancer_RegisterNodeInfo_Call) Run(run func(nodeInfos []nodeInfo)) *MockLBBalancer_RegisterNodeInfo_Call

func (*MockLBBalancer_RegisterNodeInfo_Call) RunAndReturn

func (_c *MockLBBalancer_RegisterNodeInfo_Call) RunAndReturn(run func([]nodeInfo)) *MockLBBalancer_RegisterNodeInfo_Call

type MockLBBalancer_SelectNode_Call

type MockLBBalancer_SelectNode_Call struct {
	*mock.Call
}

MockLBBalancer_SelectNode_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SelectNode'

func (*MockLBBalancer_SelectNode_Call) Return

func (*MockLBBalancer_SelectNode_Call) Run

func (_c *MockLBBalancer_SelectNode_Call) Run(run func(ctx context.Context, availableNodes []int64, nq int64)) *MockLBBalancer_SelectNode_Call

func (*MockLBBalancer_SelectNode_Call) RunAndReturn

type MockLBBalancer_Start_Call

type MockLBBalancer_Start_Call struct {
	*mock.Call
}

MockLBBalancer_Start_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Start'

func (*MockLBBalancer_Start_Call) Return

func (*MockLBBalancer_Start_Call) Run

func (*MockLBBalancer_Start_Call) RunAndReturn

type MockLBBalancer_UpdateCostMetrics_Call

type MockLBBalancer_UpdateCostMetrics_Call struct {
	*mock.Call
}

MockLBBalancer_UpdateCostMetrics_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateCostMetrics'

func (*MockLBBalancer_UpdateCostMetrics_Call) Return

func (*MockLBBalancer_UpdateCostMetrics_Call) Run

func (*MockLBBalancer_UpdateCostMetrics_Call) RunAndReturn

type MockLBPolicy

type MockLBPolicy struct {
	mock.Mock
}

MockLBPolicy is an autogenerated mock type for the LBPolicy type

func NewMockLBPolicy

func NewMockLBPolicy(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockLBPolicy

NewMockLBPolicy creates a new instance of MockLBPolicy. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockLBPolicy) Close

func (_m *MockLBPolicy) Close()

Close provides a mock function with given fields:

func (*MockLBPolicy) EXPECT

func (_m *MockLBPolicy) EXPECT() *MockLBPolicy_Expecter

func (*MockLBPolicy) Execute

func (_m *MockLBPolicy) Execute(ctx context.Context, workload CollectionWorkLoad) error

Execute provides a mock function with given fields: ctx, workload

func (*MockLBPolicy) ExecuteWithRetry

func (_m *MockLBPolicy) ExecuteWithRetry(ctx context.Context, workload ChannelWorkload) error

ExecuteWithRetry provides a mock function with given fields: ctx, workload

func (*MockLBPolicy) Start

func (_m *MockLBPolicy) Start(ctx context.Context)

Start provides a mock function with given fields: ctx

func (*MockLBPolicy) UpdateCostMetrics

func (_m *MockLBPolicy) UpdateCostMetrics(node int64, cost *internalpb.CostAggregation)

UpdateCostMetrics provides a mock function with given fields: node, cost

type MockLBPolicy_Close_Call

type MockLBPolicy_Close_Call struct {
	*mock.Call
}

MockLBPolicy_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close'

func (*MockLBPolicy_Close_Call) Return

func (*MockLBPolicy_Close_Call) Run

func (_c *MockLBPolicy_Close_Call) Run(run func()) *MockLBPolicy_Close_Call

func (*MockLBPolicy_Close_Call) RunAndReturn

func (_c *MockLBPolicy_Close_Call) RunAndReturn(run func()) *MockLBPolicy_Close_Call

type MockLBPolicy_ExecuteWithRetry_Call

type MockLBPolicy_ExecuteWithRetry_Call struct {
	*mock.Call
}

MockLBPolicy_ExecuteWithRetry_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ExecuteWithRetry'

func (*MockLBPolicy_ExecuteWithRetry_Call) Return

func (*MockLBPolicy_ExecuteWithRetry_Call) Run

func (*MockLBPolicy_ExecuteWithRetry_Call) RunAndReturn

type MockLBPolicy_Execute_Call

type MockLBPolicy_Execute_Call struct {
	*mock.Call
}

MockLBPolicy_Execute_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Execute'

func (*MockLBPolicy_Execute_Call) Return

func (*MockLBPolicy_Execute_Call) Run

func (*MockLBPolicy_Execute_Call) RunAndReturn

type MockLBPolicy_Expecter

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

func (*MockLBPolicy_Expecter) Close

Close is a helper method to define mock.On call

func (*MockLBPolicy_Expecter) Execute

func (_e *MockLBPolicy_Expecter) Execute(ctx interface{}, workload interface{}) *MockLBPolicy_Execute_Call

Execute is a helper method to define mock.On call

  • ctx context.Context
  • workload CollectionWorkLoad

func (*MockLBPolicy_Expecter) ExecuteWithRetry

func (_e *MockLBPolicy_Expecter) ExecuteWithRetry(ctx interface{}, workload interface{}) *MockLBPolicy_ExecuteWithRetry_Call

ExecuteWithRetry is a helper method to define mock.On call

  • ctx context.Context
  • workload ChannelWorkload

func (*MockLBPolicy_Expecter) Start

func (_e *MockLBPolicy_Expecter) Start(ctx interface{}) *MockLBPolicy_Start_Call

Start is a helper method to define mock.On call

  • ctx context.Context

func (*MockLBPolicy_Expecter) UpdateCostMetrics

func (_e *MockLBPolicy_Expecter) UpdateCostMetrics(node interface{}, cost interface{}) *MockLBPolicy_UpdateCostMetrics_Call

UpdateCostMetrics is a helper method to define mock.On call

  • node int64
  • cost *internalpb.CostAggregation

type MockLBPolicy_Start_Call

type MockLBPolicy_Start_Call struct {
	*mock.Call
}

MockLBPolicy_Start_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Start'

func (*MockLBPolicy_Start_Call) Return

func (*MockLBPolicy_Start_Call) Run

func (*MockLBPolicy_Start_Call) RunAndReturn

func (_c *MockLBPolicy_Start_Call) RunAndReturn(run func(context.Context)) *MockLBPolicy_Start_Call

type MockLBPolicy_UpdateCostMetrics_Call

type MockLBPolicy_UpdateCostMetrics_Call struct {
	*mock.Call
}

MockLBPolicy_UpdateCostMetrics_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateCostMetrics'

func (*MockLBPolicy_UpdateCostMetrics_Call) Return

func (*MockLBPolicy_UpdateCostMetrics_Call) Run

func (*MockLBPolicy_UpdateCostMetrics_Call) RunAndReturn

type MockShardClientManager

type MockShardClientManager struct {
	mock.Mock
}

MockShardClientManager is an autogenerated mock type for the shardClientMgr type

func NewMockShardClientManager

func NewMockShardClientManager(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockShardClientManager

NewMockShardClientManager creates a new instance of MockShardClientManager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockShardClientManager) Close

func (_m *MockShardClientManager) Close()

Close provides a mock function with given fields:

func (*MockShardClientManager) EXPECT

func (*MockShardClientManager) GetClient

func (_m *MockShardClientManager) GetClient(ctx context.Context, nodeInfo1 nodeInfo) (types.QueryNodeClient, error)

GetClient provides a mock function with given fields: ctx, nodeInfo1

func (*MockShardClientManager) SetClientCreatorFunc

func (_m *MockShardClientManager) SetClientCreatorFunc(creator queryNodeCreatorFunc)

SetClientCreatorFunc provides a mock function with given fields: creator

type MockShardClientManager_Close_Call

type MockShardClientManager_Close_Call struct {
	*mock.Call
}

MockShardClientManager_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close'

func (*MockShardClientManager_Close_Call) Return

func (*MockShardClientManager_Close_Call) Run

func (*MockShardClientManager_Close_Call) RunAndReturn

type MockShardClientManager_Expecter

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

func (*MockShardClientManager_Expecter) Close

Close is a helper method to define mock.On call

func (*MockShardClientManager_Expecter) GetClient

func (_e *MockShardClientManager_Expecter) GetClient(ctx interface{}, nodeInfo1 interface{}) *MockShardClientManager_GetClient_Call

GetClient is a helper method to define mock.On call

  • ctx context.Context
  • nodeInfo1 nodeInfo

func (*MockShardClientManager_Expecter) SetClientCreatorFunc

func (_e *MockShardClientManager_Expecter) SetClientCreatorFunc(creator interface{}) *MockShardClientManager_SetClientCreatorFunc_Call

SetClientCreatorFunc is a helper method to define mock.On call

  • creator queryNodeCreatorFunc

type MockShardClientManager_GetClient_Call

type MockShardClientManager_GetClient_Call struct {
	*mock.Call
}

MockShardClientManager_GetClient_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetClient'

func (*MockShardClientManager_GetClient_Call) Return

func (*MockShardClientManager_GetClient_Call) Run

func (*MockShardClientManager_GetClient_Call) RunAndReturn

type MockShardClientManager_SetClientCreatorFunc_Call

type MockShardClientManager_SetClientCreatorFunc_Call struct {
	*mock.Call
}

MockShardClientManager_SetClientCreatorFunc_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetClientCreatorFunc'

func (*MockShardClientManager_SetClientCreatorFunc_Call) Return

func (*MockShardClientManager_SetClientCreatorFunc_Call) Run

func (*MockShardClientManager_SetClientCreatorFunc_Call) RunAndReturn

type PrivilegeCache

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

PrivilegeCache is a cache for privilege enforce result version provides version control when any policy updates

type PrivilegeFunc

type PrivilegeFunc func(ctx context.Context, req interface{}) (context.Context, error)

type Proxy

type Proxy struct {
	milvuspb.UnimplementedMilvusServiceServer
	// contains filtered or unexported fields
}

Proxy of milvus

func NewProxy

func NewProxy(ctx context.Context, factory dependency.Factory) (*Proxy, error)

NewProxy returns a Proxy struct.

func (*Proxy) AddCloseCallback

func (node *Proxy) AddCloseCallback(callbacks ...func())

AddCloseCallback adds a callback in the Close phase.

func (*Proxy) AddStartCallback

func (node *Proxy) AddStartCallback(callbacks ...func())

AddStartCallback adds a callback in the startServer phase.

func (*Proxy) AllocTimestamp

func (*Proxy) AlterAlias

func (node *Proxy) AlterAlias(ctx context.Context, request *milvuspb.AlterAliasRequest) (*commonpb.Status, error)

AlterAlias alter alias of collection.

func (*Proxy) AlterCollection

func (node *Proxy) AlterCollection(ctx context.Context, request *milvuspb.AlterCollectionRequest) (*commonpb.Status, error)

func (*Proxy) AlterDatabase

func (node *Proxy) AlterDatabase(ctx context.Context, request *milvuspb.AlterDatabaseRequest) (*commonpb.Status, error)

func (*Proxy) AlterIndex

func (node *Proxy) AlterIndex(ctx context.Context, request *milvuspb.AlterIndexRequest) (*commonpb.Status, error)

func (*Proxy) BackupRBAC

func (*Proxy) CalcDistance

func (node *Proxy) CalcDistance(ctx context.Context, request *milvuspb.CalcDistanceRequest) (*milvuspb.CalcDistanceResults, error)

CalcDistance calculates the distances between vectors.

func (*Proxy) CheckHealth

func (node *Proxy) CheckHealth(ctx context.Context, request *milvuspb.CheckHealthRequest) (*milvuspb.CheckHealthResponse, error)

func (*Proxy) CheckQueryNodeDistribution

func (node *Proxy) CheckQueryNodeDistribution(w http.ResponseWriter, req *http.Request)

func (*Proxy) Connect

func (node *Proxy) Connect(ctx context.Context, request *milvuspb.ConnectRequest) (*milvuspb.ConnectResponse, error)

func (*Proxy) CreateAlias

func (node *Proxy) CreateAlias(ctx context.Context, request *milvuspb.CreateAliasRequest) (*commonpb.Status, error)

CreateAlias create alias for collection, then you can search the collection with alias.

func (*Proxy) CreateCollection

func (node *Proxy) CreateCollection(ctx context.Context, request *milvuspb.CreateCollectionRequest) (*commonpb.Status, error)

CreateCollection create a collection by the schema. TODO(dragondriver): add more detailed ut for ConsistencyLevel, should we support multiple consistency level in Proxy?

func (*Proxy) CreateCredential

func (node *Proxy) CreateCredential(ctx context.Context, req *milvuspb.CreateCredentialRequest) (*commonpb.Status, error)

func (*Proxy) CreateDatabase

func (node *Proxy) CreateDatabase(ctx context.Context, request *milvuspb.CreateDatabaseRequest) (*commonpb.Status, error)

func (*Proxy) CreateIndex

func (node *Proxy) CreateIndex(ctx context.Context, request *milvuspb.CreateIndexRequest) (*commonpb.Status, error)

CreateIndex create index for collection.

func (*Proxy) CreatePartition

func (node *Proxy) CreatePartition(ctx context.Context, request *milvuspb.CreatePartitionRequest) (*commonpb.Status, error)

CreatePartition create a partition in specific collection.

func (*Proxy) CreatePrivilegeGroup

func (node *Proxy) CreatePrivilegeGroup(ctx context.Context, req *milvuspb.CreatePrivilegeGroupRequest) (*commonpb.Status, error)

func (*Proxy) CreateResourceGroup

func (node *Proxy) CreateResourceGroup(ctx context.Context, request *milvuspb.CreateResourceGroupRequest) (*commonpb.Status, error)

func (*Proxy) CreateRole

func (node *Proxy) CreateRole(ctx context.Context, req *milvuspb.CreateRoleRequest) (*commonpb.Status, error)

func (*Proxy) Delete

func (node *Proxy) Delete(ctx context.Context, request *milvuspb.DeleteRequest) (*milvuspb.MutationResult, error)

Delete delete records from collection, then these records cannot be searched.

func (*Proxy) DeleteCredential

func (node *Proxy) DeleteCredential(ctx context.Context, req *milvuspb.DeleteCredentialRequest) (*commonpb.Status, error)

func (*Proxy) DescribeAlias

func (node *Proxy) DescribeAlias(ctx context.Context, request *milvuspb.DescribeAliasRequest) (*milvuspb.DescribeAliasResponse, error)

DescribeAlias describe alias of collection.

func (*Proxy) DescribeCollection

DescribeCollection get the meta information of specific collection, such as schema, created timestamp and etc.

func (*Proxy) DescribeDatabase

func (node *Proxy) DescribeDatabase(ctx context.Context, request *milvuspb.DescribeDatabaseRequest) (*milvuspb.DescribeDatabaseResponse, error)

func (*Proxy) DescribeIndex

func (node *Proxy) DescribeIndex(ctx context.Context, request *milvuspb.DescribeIndexRequest) (*milvuspb.DescribeIndexResponse, error)

DescribeIndex get the meta information of index, such as index state, index id and etc.

func (*Proxy) DropAlias

func (node *Proxy) DropAlias(ctx context.Context, request *milvuspb.DropAliasRequest) (*commonpb.Status, error)

DropAlias alter the alias of collection.

func (*Proxy) DropCollection

func (node *Proxy) DropCollection(ctx context.Context, request *milvuspb.DropCollectionRequest) (*commonpb.Status, error)

DropCollection drop a collection.

func (*Proxy) DropDatabase

func (node *Proxy) DropDatabase(ctx context.Context, request *milvuspb.DropDatabaseRequest) (*commonpb.Status, error)

func (*Proxy) DropIndex

func (node *Proxy) DropIndex(ctx context.Context, request *milvuspb.DropIndexRequest) (*commonpb.Status, error)

DropIndex drop the index of collection.

func (*Proxy) DropPartition

func (node *Proxy) DropPartition(ctx context.Context, request *milvuspb.DropPartitionRequest) (*commonpb.Status, error)

DropPartition drop a partition in specific collection.

func (*Proxy) DropPrivilegeGroup

func (node *Proxy) DropPrivilegeGroup(ctx context.Context, req *milvuspb.DropPrivilegeGroupRequest) (*commonpb.Status, error)

func (*Proxy) DropResourceGroup

func (node *Proxy) DropResourceGroup(ctx context.Context, request *milvuspb.DropResourceGroupRequest) (*commonpb.Status, error)

func (*Proxy) DropRole

func (node *Proxy) DropRole(ctx context.Context, req *milvuspb.DropRoleRequest) (*commonpb.Status, error)

func (*Proxy) Dummy

Dummy handles dummy request

func (*Proxy) Flush

func (node *Proxy) Flush(ctx context.Context, request *milvuspb.FlushRequest) (*milvuspb.FlushResponse, error)

Flush notify data nodes to persist the data of collection.

func (*Proxy) FlushAll

FlushAll notifies Proxy to flush all collection's DML messages.

func (*Proxy) GetAddress

func (node *Proxy) GetAddress() string

func (*Proxy) GetCollectionStatistics

GetCollectionStatistics get the collection statistics, such as `num_rows`.

func (*Proxy) GetCompactionState

GetCompactionState gets the compaction state of multiple segments

func (*Proxy) GetCompactionStateWithPlans

func (node *Proxy) GetCompactionStateWithPlans(ctx context.Context, req *milvuspb.GetCompactionPlansRequest) (*milvuspb.GetCompactionPlansResponse, error)

GetCompactionStateWithPlans returns the compactions states with the given plan ID

func (*Proxy) GetComponentStates

func (node *Proxy) GetComponentStates(ctx context.Context, req *milvuspb.GetComponentStatesRequest) (*milvuspb.ComponentStates, error)

GetComponentStates gets the state of Proxy.

func (*Proxy) GetDdChannel

func (node *Proxy) GetDdChannel(ctx context.Context, request *internalpb.GetDdChannelRequest) (*milvuspb.StringResponse, error)

GetDdChannel returns the used channel for dd operations.

func (*Proxy) GetFlushAllState

GetFlushAllState checks if all DML messages before `FlushAllTs` have been flushed.

func (*Proxy) GetFlushState

GetFlushState gets the flush state of the collection based on the provided flush ts and segment IDs.

func (*Proxy) GetImportState

GetImportState checks import task state from RootCoord.

func (*Proxy) GetIndexBuildProgress

GetIndexBuildProgress gets index build progress with field_name and index_name. IndexRows is the num of indexed rows. And TotalRows is the total number of segment rows. Deprecated: use DescribeIndex instead

func (*Proxy) GetIndexState

func (node *Proxy) GetIndexState(ctx context.Context, request *milvuspb.GetIndexStateRequest) (*milvuspb.GetIndexStateResponse, error)

GetIndexState get the build-state of index. Deprecated: use DescribeIndex instead

func (*Proxy) GetIndexStatistics

GetIndexStatistics get the information of index.

func (*Proxy) GetLoadState

func (node *Proxy) GetLoadState(ctx context.Context, request *milvuspb.GetLoadStateRequest) (*milvuspb.GetLoadStateResponse, error)

func (*Proxy) GetLoadingProgress

func (*Proxy) GetMetrics

GetMetrics gets the metrics of proxy TODO(dragondriver): cache the Metrics and set a retention to the cache

func (*Proxy) GetPartitionStatistics

GetPartitionStatistics get the statistics of partition, such as num_rows.

func (*Proxy) GetPersistentSegmentInfo

GetPersistentSegmentInfo get the information of sealed segment.

func (*Proxy) GetProxyMetrics

func (node *Proxy) GetProxyMetrics(ctx context.Context, req *milvuspb.GetMetricsRequest) (*milvuspb.GetMetricsResponse, error)

GetProxyMetrics gets the metrics of proxy, it's an internal interface which is different from GetMetrics interface, because it only obtains the metrics of Proxy, not including the topological metrics of Query cluster and Data cluster.

func (*Proxy) GetQueryNodeDistribution

func (node *Proxy) GetQueryNodeDistribution(w http.ResponseWriter, req *http.Request)

func (*Proxy) GetQuerySegmentInfo

GetQuerySegmentInfo gets segment information from QueryCoord.

func (*Proxy) GetRateLimiter

func (node *Proxy) GetRateLimiter() (types.Limiter, error)

GetRateLimiter returns the rateLimiter in Proxy.

func (*Proxy) GetReplicas

GetReplicas gets replica info

func (*Proxy) GetStateCode

func (node *Proxy) GetStateCode() commonpb.StateCode

func (*Proxy) GetStatistics

func (node *Proxy) GetStatistics(ctx context.Context, request *milvuspb.GetStatisticsRequest) (*milvuspb.GetStatisticsResponse, error)

GetStatistics get the statistics, such as `num_rows`. WARNING: It is an experimental API

func (*Proxy) GetStatisticsChannel

func (node *Proxy) GetStatisticsChannel(ctx context.Context, req *internalpb.GetStatisticsChannelRequest) (*milvuspb.StringResponse, error)

GetStatisticsChannel gets statistics channel of Proxy.

func (*Proxy) GetVersion

func (node *Proxy) GetVersion(ctx context.Context, request *milvuspb.GetVersionRequest) (*milvuspb.GetVersionResponse, error)

func (*Proxy) HasCollection

func (node *Proxy) HasCollection(ctx context.Context, request *milvuspb.HasCollectionRequest) (*milvuspb.BoolResponse, error)

HasCollection check if the specific collection exists in Milvus.

func (*Proxy) HasPartition

func (node *Proxy) HasPartition(ctx context.Context, request *milvuspb.HasPartitionRequest) (*milvuspb.BoolResponse, error)

HasPartition check if partition exist.

func (*Proxy) HybridSearch

func (node *Proxy) HybridSearch(ctx context.Context, request *milvuspb.HybridSearchRequest) (*milvuspb.SearchResults, error)

func (*Proxy) Import

Import data files(json, numpy, etc.) on MinIO/S3 storage, read and parse them into sealed segments

func (*Proxy) ImportV2

func (*Proxy) Init

func (node *Proxy) Init() error

Init initialize proxy.

func (*Proxy) Insert

func (node *Proxy) Insert(ctx context.Context, request *milvuspb.InsertRequest) (*milvuspb.MutationResult, error)

Insert insert records into collection.

func (*Proxy) InvalidateCollectionMetaCache

func (node *Proxy) InvalidateCollectionMetaCache(ctx context.Context, request *proxypb.InvalidateCollMetaCacheRequest) (*commonpb.Status, error)

InvalidateCollectionMetaCache invalidate the meta cache of specific collection.

func (*Proxy) InvalidateCredentialCache

func (node *Proxy) InvalidateCredentialCache(ctx context.Context, request *proxypb.InvalidateCredCacheRequest) (*commonpb.Status, error)

InvalidateCredentialCache invalidate the credential cache of specified username.

func (*Proxy) InvalidateShardLeaderCache

func (node *Proxy) InvalidateShardLeaderCache(ctx context.Context, request *proxypb.InvalidateShardLeaderCacheRequest) (*commonpb.Status, error)

InvalidateCollectionMetaCache invalidate the meta cache of specific collection.

func (*Proxy) ListAliases

func (node *Proxy) ListAliases(ctx context.Context, request *milvuspb.ListAliasesRequest) (*milvuspb.ListAliasesResponse, error)

ListAliases show all aliases of db.

func (*Proxy) ListClientInfos

func (*Proxy) ListCredUsers

func (*Proxy) ListDatabases

func (node *Proxy) ListDatabases(ctx context.Context, request *milvuspb.ListDatabasesRequest) (*milvuspb.ListDatabasesResponse, error)

func (*Proxy) ListImportTasks

ListImportTasks get id array of all import tasks from rootcoord

func (*Proxy) ListImports

func (*Proxy) ListIndexedSegment

func (node *Proxy) ListIndexedSegment(ctx context.Context, request *federpb.ListIndexedSegmentRequest) (*federpb.ListIndexedSegmentResponse, error)

func (*Proxy) ListQueryNode

func (node *Proxy) ListQueryNode(w http.ResponseWriter, req *http.Request)

func (*Proxy) ListResourceGroups

func (*Proxy) LoadBalance

func (node *Proxy) LoadBalance(ctx context.Context, req *milvuspb.LoadBalanceRequest) (*commonpb.Status, error)

LoadBalance would do a load balancing operation between query nodes

func (*Proxy) LoadCollection

func (node *Proxy) LoadCollection(ctx context.Context, request *milvuspb.LoadCollectionRequest) (*commonpb.Status, error)

LoadCollection load a collection into query nodes.

func (*Proxy) LoadPartitions

func (node *Proxy) LoadPartitions(ctx context.Context, request *milvuspb.LoadPartitionsRequest) (*commonpb.Status, error)

LoadPartitions load specific partitions into query nodes.

func (*Proxy) ManualCompaction

ManualCompaction invokes compaction on specified collection

func (*Proxy) OperatePrivilege

func (node *Proxy) OperatePrivilege(ctx context.Context, req *milvuspb.OperatePrivilegeRequest) (*commonpb.Status, error)

func (*Proxy) OperatePrivilegeGroup

func (node *Proxy) OperatePrivilegeGroup(ctx context.Context, req *milvuspb.OperatePrivilegeGroupRequest) (*commonpb.Status, error)

func (*Proxy) OperatePrivilegeV2

func (node *Proxy) OperatePrivilegeV2(ctx context.Context, req *milvuspb.OperatePrivilegeV2Request) (*commonpb.Status, error)

func (*Proxy) OperateUserRole

func (node *Proxy) OperateUserRole(ctx context.Context, req *milvuspb.OperateUserRoleRequest) (*commonpb.Status, error)

func (*Proxy) PauseDatacoordGC

func (node *Proxy) PauseDatacoordGC(w http.ResponseWriter, req *http.Request)

func (*Proxy) Query

func (node *Proxy) Query(ctx context.Context, request *milvuspb.QueryRequest) (*milvuspb.QueryResults, error)

Query get the records by primary keys.

func (*Proxy) RefreshPolicyInfoCache

func (node *Proxy) RefreshPolicyInfoCache(ctx context.Context, req *proxypb.RefreshPolicyInfoCacheRequest) (*commonpb.Status, error)

func (*Proxy) Register

func (node *Proxy) Register() error

Register registers proxy at etcd

RegisterLink registers a link

func (*Proxy) RegisterRestRouter

func (node *Proxy) RegisterRestRouter(router gin.IRouter)

RegisterRestRouter registers the router for the proxy

func (*Proxy) ReleaseCollection

func (node *Proxy) ReleaseCollection(ctx context.Context, request *milvuspb.ReleaseCollectionRequest) (*commonpb.Status, error)

ReleaseCollection remove the loaded collection from query nodes.

func (*Proxy) ReleasePartitions

func (node *Proxy) ReleasePartitions(ctx context.Context, request *milvuspb.ReleasePartitionsRequest) (*commonpb.Status, error)

ReleasePartitions release specific partitions from query nodes.

func (*Proxy) RenameCollection

func (node *Proxy) RenameCollection(ctx context.Context, req *milvuspb.RenameCollectionRequest) (*commonpb.Status, error)

func (*Proxy) ReplicateMessage

func (*Proxy) RestoreRBAC

func (node *Proxy) RestoreRBAC(ctx context.Context, req *milvuspb.RestoreRBACMetaRequest) (*commonpb.Status, error)

func (*Proxy) ResumeDatacoordGC

func (node *Proxy) ResumeDatacoordGC(w http.ResponseWriter, req *http.Request)

func (*Proxy) ResumeQueryCoordBalance

func (node *Proxy) ResumeQueryCoordBalance(w http.ResponseWriter, req *http.Request)

func (*Proxy) ResumeQueryNode

func (node *Proxy) ResumeQueryNode(w http.ResponseWriter, req *http.Request)

func (*Proxy) Search

func (node *Proxy) Search(ctx context.Context, request *milvuspb.SearchRequest) (*milvuspb.SearchResults, error)

Search searches the most similar records of requests.

func (*Proxy) SelectGrant

func (*Proxy) SelectRole

func (*Proxy) SelectUser

func (*Proxy) SetAddress

func (node *Proxy) SetAddress(address string)

func (*Proxy) SetDataCoordClient

func (node *Proxy) SetDataCoordClient(cli types.DataCoordClient)

SetDataCoordClient sets DataCoord client for proxy.

func (*Proxy) SetEtcdClient

func (node *Proxy) SetEtcdClient(client *clientv3.Client)

SetEtcdClient sets etcd client for proxy.

func (*Proxy) SetQueryCoordClient

func (node *Proxy) SetQueryCoordClient(cli types.QueryCoordClient)

SetQueryCoordClient sets QueryCoord client for proxy.

func (*Proxy) SetQueryNodeCreator

func (node *Proxy) SetQueryNodeCreator(f func(ctx context.Context, addr string, nodeID int64) (types.QueryNodeClient, error))

func (*Proxy) SetRates

func (node *Proxy) SetRates(ctx context.Context, request *proxypb.SetRatesRequest) (*commonpb.Status, error)

SetRates limits the rates of requests.

func (*Proxy) SetRootCoordClient

func (node *Proxy) SetRootCoordClient(cli types.RootCoordClient)

SetRootCoordClient sets RootCoord client for proxy.

func (*Proxy) ShowCollections

func (node *Proxy) ShowCollections(ctx context.Context, request *milvuspb.ShowCollectionsRequest) (*milvuspb.ShowCollectionsResponse, error)

ShowCollections list all collections in Milvus.

func (*Proxy) ShowPartitions

func (node *Proxy) ShowPartitions(ctx context.Context, request *milvuspb.ShowPartitionsRequest) (*milvuspb.ShowPartitionsResponse, error)

ShowPartitions list all partitions in the specific collection.

func (*Proxy) Start

func (node *Proxy) Start() error

Start starts a proxy node.

func (*Proxy) Stop

func (node *Proxy) Stop() error

Stop stops a proxy node.

func (*Proxy) SuspendQueryCoordBalance

func (node *Proxy) SuspendQueryCoordBalance(w http.ResponseWriter, req *http.Request)

func (*Proxy) SuspendQueryNode

func (node *Proxy) SuspendQueryNode(w http.ResponseWriter, req *http.Request)

func (*Proxy) TransferChannel

func (node *Proxy) TransferChannel(w http.ResponseWriter, req *http.Request)

func (*Proxy) TransferNode

func (node *Proxy) TransferNode(ctx context.Context, request *milvuspb.TransferNodeRequest) (*commonpb.Status, error)

func (*Proxy) TransferReplica

func (node *Proxy) TransferReplica(ctx context.Context, request *milvuspb.TransferReplicaRequest) (*commonpb.Status, error)

func (*Proxy) TransferSegment

func (node *Proxy) TransferSegment(w http.ResponseWriter, req *http.Request)

func (*Proxy) UpdateCredential

func (node *Proxy) UpdateCredential(ctx context.Context, req *milvuspb.UpdateCredentialRequest) (*commonpb.Status, error)

func (*Proxy) UpdateCredentialCache

func (node *Proxy) UpdateCredentialCache(ctx context.Context, request *proxypb.UpdateCredCacheRequest) (*commonpb.Status, error)

UpdateCredentialCache update the credential cache of specified username.

func (*Proxy) UpdateResourceGroups

func (node *Proxy) UpdateResourceGroups(ctx context.Context, request *milvuspb.UpdateResourceGroupsRequest) (*commonpb.Status, error)

func (*Proxy) UpdateStateCode

func (node *Proxy) UpdateStateCode(code commonpb.StateCode)

UpdateStateCode updates the state code of Proxy.

func (*Proxy) Upsert

func (node *Proxy) Upsert(ctx context.Context, request *milvuspb.UpsertRequest) (*milvuspb.MutationResult, error)

Upsert upsert records into collection.

type ReplicateStreamManager

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

func NewReplicateStreamManager

func NewReplicateStreamManager(ctx context.Context, factory msgstream.Factory, resourceManager resource.Manager) *ReplicateStreamManager

func (*ReplicateStreamManager) GetMsgDispatcher

func (*ReplicateStreamManager) GetReplicateMsgStream

func (m *ReplicateStreamManager) GetReplicateMsgStream(ctx context.Context, channel string) (msgstream.MsgStream, error)

type RoundRobinBalancer

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

func NewRoundRobinBalancer

func NewRoundRobinBalancer() *RoundRobinBalancer

func (*RoundRobinBalancer) CancelWorkload

func (b *RoundRobinBalancer) CancelWorkload(node int64, nq int64)

func (*RoundRobinBalancer) Close

func (b *RoundRobinBalancer) Close()

func (*RoundRobinBalancer) RegisterNodeInfo

func (b *RoundRobinBalancer) RegisterNodeInfo(nodeInfos []nodeInfo)

func (*RoundRobinBalancer) SelectNode

func (b *RoundRobinBalancer) SelectNode(ctx context.Context, availableNodes []int64, cost int64) (int64, error)

func (*RoundRobinBalancer) Start

func (b *RoundRobinBalancer) Start(ctx context.Context)

func (*RoundRobinBalancer) UpdateCostMetrics

func (b *RoundRobinBalancer) UpdateCostMetrics(node int64, cost *internalpb.CostAggregation)

type SearchInfo

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

type SimpleLimiter

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

SimpleLimiter is implemented based on Limiter interface

func NewSimpleLimiter

func NewSimpleLimiter(allocWaitInterval time.Duration, allocRetryTimes uint) *SimpleLimiter

NewSimpleLimiter returns a new SimpleLimiter.

func (*SimpleLimiter) Alloc

func (m *SimpleLimiter) Alloc(ctx context.Context, dbID int64, collectionIDToPartIDs map[int64][]int64, rt internalpb.RateType, n int) error

Alloc will retry till check pass or out of times.

func (*SimpleLimiter) Check

func (m *SimpleLimiter) Check(dbID int64, collectionIDToPartIDs map[int64][]int64, rt internalpb.RateType, n int) error

Check checks if request would be limited or denied.

func (*SimpleLimiter) GetQuotaStates

func (m *SimpleLimiter) GetQuotaStates() ([]milvuspb.QuotaState, []string)

GetQuotaStates returns quota states.

func (*SimpleLimiter) SetRates

func (m *SimpleLimiter) SetRates(rootLimiter *proxypb.LimiterNode) error

SetRates sets quota states for SimpleLimiter.

type TaskCondition

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

TaskCondition implements Condition interface for tasks

func NewTaskCondition

func NewTaskCondition(ctx context.Context) *TaskCondition

NewTaskCondition creates a TaskCondition with provided context

func (*TaskCondition) Ctx

func (tc *TaskCondition) Ctx() context.Context

Ctx returns internal context

func (*TaskCondition) Notify

func (tc *TaskCondition) Notify(err error)

Notify sends a signal into the done channel

func (*TaskCondition) WaitToFinish

func (tc *TaskCondition) WaitToFinish() error

WaitToFinish waits until the TaskCondition is notified or context done or canceled

type Timestamp

type Timestamp = typeutil.Timestamp

Timestamp is alias of typeutil.Timestamp

type TransferNodeTask

type TransferNodeTask struct {
	Condition
	*milvuspb.TransferNodeRequest
	// contains filtered or unexported fields
}

func (*TransferNodeTask) BeginTs

func (t *TransferNodeTask) BeginTs() Timestamp

func (*TransferNodeTask) CanSkipAllocTimestamp

func (bt *TransferNodeTask) CanSkipAllocTimestamp() bool

func (*TransferNodeTask) EndTs

func (t *TransferNodeTask) EndTs() Timestamp

func (*TransferNodeTask) Execute

func (t *TransferNodeTask) Execute(ctx context.Context) error

func (*TransferNodeTask) GetDurationInQueue

func (bt *TransferNodeTask) GetDurationInQueue() time.Duration

func (*TransferNodeTask) ID

func (t *TransferNodeTask) ID() UniqueID

func (*TransferNodeTask) Name

func (t *TransferNodeTask) Name() string

func (*TransferNodeTask) OnEnqueue

func (t *TransferNodeTask) OnEnqueue() error

func (*TransferNodeTask) PostExecute

func (t *TransferNodeTask) PostExecute(ctx context.Context) error

func (*TransferNodeTask) PreExecute

func (t *TransferNodeTask) PreExecute(ctx context.Context) error

func (*TransferNodeTask) SetID

func (t *TransferNodeTask) SetID(uid UniqueID)

func (*TransferNodeTask) SetOnEnqueueTime

func (bt *TransferNodeTask) SetOnEnqueueTime()

func (*TransferNodeTask) SetTs

func (t *TransferNodeTask) SetTs(ts Timestamp)

func (*TransferNodeTask) TraceCtx

func (t *TransferNodeTask) TraceCtx() context.Context

func (*TransferNodeTask) Type

func (t *TransferNodeTask) Type() commonpb.MsgType

type TransferReplicaTask

type TransferReplicaTask struct {
	Condition
	*milvuspb.TransferReplicaRequest
	// contains filtered or unexported fields
}

func (*TransferReplicaTask) BeginTs

func (t *TransferReplicaTask) BeginTs() Timestamp

func (*TransferReplicaTask) CanSkipAllocTimestamp

func (bt *TransferReplicaTask) CanSkipAllocTimestamp() bool

func (*TransferReplicaTask) EndTs

func (t *TransferReplicaTask) EndTs() Timestamp

func (*TransferReplicaTask) Execute

func (t *TransferReplicaTask) Execute(ctx context.Context) error

func (*TransferReplicaTask) GetDurationInQueue

func (bt *TransferReplicaTask) GetDurationInQueue() time.Duration

func (*TransferReplicaTask) ID

func (t *TransferReplicaTask) ID() UniqueID

func (*TransferReplicaTask) Name

func (t *TransferReplicaTask) Name() string

func (*TransferReplicaTask) OnEnqueue

func (t *TransferReplicaTask) OnEnqueue() error

func (*TransferReplicaTask) PostExecute

func (t *TransferReplicaTask) PostExecute(ctx context.Context) error

func (*TransferReplicaTask) PreExecute

func (t *TransferReplicaTask) PreExecute(ctx context.Context) error

func (*TransferReplicaTask) SetID

func (t *TransferReplicaTask) SetID(uid UniqueID)

func (*TransferReplicaTask) SetOnEnqueueTime

func (bt *TransferReplicaTask) SetOnEnqueueTime()

func (*TransferReplicaTask) SetTs

func (t *TransferReplicaTask) SetTs(ts Timestamp)

func (*TransferReplicaTask) TraceCtx

func (t *TransferReplicaTask) TraceCtx() context.Context

func (*TransferReplicaTask) Type

type UniqueID

type UniqueID = typeutil.UniqueID

UniqueID is alias of typeutil.UniqueID

type UpdateResourceGroupsTask

type UpdateResourceGroupsTask struct {
	Condition
	*milvuspb.UpdateResourceGroupsRequest
	// contains filtered or unexported fields
}

func (*UpdateResourceGroupsTask) BeginTs

func (t *UpdateResourceGroupsTask) BeginTs() Timestamp

func (*UpdateResourceGroupsTask) CanSkipAllocTimestamp

func (bt *UpdateResourceGroupsTask) CanSkipAllocTimestamp() bool

func (*UpdateResourceGroupsTask) EndTs

func (*UpdateResourceGroupsTask) Execute

func (*UpdateResourceGroupsTask) GetDurationInQueue

func (bt *UpdateResourceGroupsTask) GetDurationInQueue() time.Duration

func (*UpdateResourceGroupsTask) ID

func (*UpdateResourceGroupsTask) Name

func (t *UpdateResourceGroupsTask) Name() string

func (*UpdateResourceGroupsTask) OnEnqueue

func (t *UpdateResourceGroupsTask) OnEnqueue() error

func (*UpdateResourceGroupsTask) PostExecute

func (t *UpdateResourceGroupsTask) PostExecute(ctx context.Context) error

func (*UpdateResourceGroupsTask) PreExecute

func (t *UpdateResourceGroupsTask) PreExecute(ctx context.Context) error

func (*UpdateResourceGroupsTask) SetID

func (t *UpdateResourceGroupsTask) SetID(uid UniqueID)

func (*UpdateResourceGroupsTask) SetOnEnqueueTime

func (bt *UpdateResourceGroupsTask) SetOnEnqueueTime()

func (*UpdateResourceGroupsTask) SetTs

func (t *UpdateResourceGroupsTask) SetTs(ts Timestamp)

func (*UpdateResourceGroupsTask) TraceCtx

func (*UpdateResourceGroupsTask) Type

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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