proxy

package
v0.10.3-0...-96d0e78 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2025 License: Apache-2.0 Imports: 113 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.

Index

Constants

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"
	CollectionID         = "collection_id"
	GroupByFieldKey      = "group_by_field"
	GroupSizeKey         = "group_size"
	StrictGroupSize      = "strict_group_size"
	JSONPath             = "json_path"
	JSONType             = "json_type"
	StrictCastKey        = "strict_cast"
	RankGroupScorer      = "rank_group_scorer"
	AnnsFieldKey         = "anns_field"
	TopKKey              = "topk"
	NQKey                = "nq"
	MetricTypeKey        = common.MetricTypeKey
	ParamsKey            = common.ParamsKey
	ExprParamsKey        = "expr_params"
	RoundDecimalKey      = "round_decimal"
	OffsetKey            = "offset"
	LimitKey             = "limit"
	// key for timestamptz translation
	TimefieldsKey = "time_fields"

	SearchIterV2Key        = "search_iter_v2"
	SearchIterBatchSizeKey = "search_iter_batch_size"
	SearchIterLastBoundKey = "search_iter_last_bound"
	SearchIterIdKey        = "search_iter_id"

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

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

	AddFieldTaskName = "AddFieldTaskName"

	RankTypeKey      = "strategy"
	RRFParamsKey     = "k"
	WeightsParamsKey = "weights"
	NormScoreKey     = "norm_score"
)
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 LoadPriorityName = "load_priority"
View Source
const (
	MmapEnabledKey = "mmap_enabled"
)

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, dataType schemapb.DataType, elementType schemapb.DataType) bool

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 FillWithDefaultValue

func FillWithDefaultValue(field *schemapb.FieldData, fieldSchema *schemapb.FieldSchema, numRows int) error

func FillWithNullValue

func FillWithNullValue(field *schemapb.FieldData, fieldSchema *schemapb.FieldSchema, numRows int) error

func GenNullableFieldData

func GenNullableFieldData(field *schemapb.FieldSchema, upsertIDSize int) (*schemapb.FieldData, error)

GenNullableFieldData generates nullable field data in FULL FORMAT

func GetBM25FunctionOutputFields

func GetBM25FunctionOutputFields(collSchema *schemapb.CollectionSchema) []string

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 GetFunctionOutputFields

func GetFunctionOutputFields(collSchema *schemapb.CollectionSchema) []string

func GetImportFiles

func GetImportFiles(internals []*internalpb.ImportFile) []*msgpb.ImportFile

func GetReplicateID

func GetReplicateID(ctx context.Context, database, collectionName string) (string, error)

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 proto.Message) (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 GetStorageCost

func GetStorageCost(status *commonpb.Status) (int64, int64, float64, bool)

final return value means value is valid or not

func GrpcAuthInterceptor

func GrpcAuthInterceptor(authFunc grpc_auth.AuthFunc) grpc.UnaryServerInterceptor

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, mixCoord types.MixCoordClient) error

InitMetaCache initializes globalMetaCache

func IsDDLRequest

func IsDDLRequest(rt internalpb.RateType) bool

func IsDefaultRole

func IsDefaultRole(roleName string) bool

func IsKeyAllowAlter

func IsKeyAllowAlter(key string) bool

func IsKeyAllowDrop

func IsKeyAllowDrop(key string) bool

func LackOfFieldsDataBySchema

func LackOfFieldsDataBySchema(schema *schemapb.CollectionSchema, fieldsData []*schemapb.FieldData, skipPkFieldCheck bool, skipDynamicFieldCheck bool) error

check whether insertMsg has all fields in schema

func NewContextWithMetadata

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

func PasswordVerify

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

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 SetReportValue

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

func SetStorageCost

func SetStorageCost(status *commonpb.Status, storageCost segcore.StorageCost)

func ToCompressedFormatNullable

func ToCompressedFormatNullable(field *schemapb.FieldData) error

ToCompressedFormatNullable converts the field data from full format nullable to compressed format nullable

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 ValidateCollectionName

func ValidateCollectionName(entity string) error

func ValidateDatabaseName

func ValidateDatabaseName(dbName string) error

func ValidateField

func ValidateField(field *schemapb.FieldSchema, schema *schemapb.CollectionSchema) error

func ValidateFieldAutoID

func ValidateFieldAutoID(coll *schemapb.CollectionSchema) error

ValidateFieldAutoID call after validatePrimaryKey

func ValidateFieldsInStruct

func ValidateFieldsInStruct(field *schemapb.FieldSchema, schema *schemapb.CollectionSchema) error

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 ValidateStructArrayField

func ValidateStructArrayField(structArrayField *schemapb.StructArrayFieldSchema, schema *schemapb.CollectionSchema) error

func ValidateTask

func ValidateTask(task any) 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) GetDurationInExecuting

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

func (*AlterAliasTask) GetDurationInQueue

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

func (*AlterAliasTask) ID

func (t *AlterAliasTask) ID() UniqueID

func (*AlterAliasTask) IsSubTask

func (bt *AlterAliasTask) IsSubTask() bool

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) SetExecutingTime

func (bt *AlterAliasTask) SetExecutingTime()

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)
	// GetShard(ctx context.Context, withCache bool, database, collectionName string, collectionID int64, channel string) ([]nodeInfo, error)
	// GetShardLeaderList(ctx context.Context, database, collectionName string, collectionID int64, withCache bool) ([]string, 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, version uint64, removeVersion bool) []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 CachedProxyServiceProvider

type CachedProxyServiceProvider struct {
	*Proxy
}

func (*CachedProxyServiceProvider) DescribeCollection

type Condition

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

Condition defines the interface of variable condition.

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) GetDurationInExecuting

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

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) IsSubTask

func (bt *CreateAliasTask) IsSubTask() bool

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) SetExecutingTime

func (bt *CreateAliasTask) SetExecutingTime()

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) GetDurationInExecuting

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

func (*CreateResourceGroupTask) GetDurationInQueue

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

func (*CreateResourceGroupTask) ID

func (*CreateResourceGroupTask) IsSubTask

func (bt *CreateResourceGroupTask) IsSubTask() bool

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) SetExecutingTime

func (bt *CreateResourceGroupTask) SetExecutingTime()

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 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) GetDurationInExecuting

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

func (*DescribeAliasTask) GetDurationInQueue

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

func (*DescribeAliasTask) ID

func (a *DescribeAliasTask) ID() UniqueID

func (*DescribeAliasTask) IsSubTask

func (bt *DescribeAliasTask) IsSubTask() bool

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) SetExecutingTime

func (bt *DescribeAliasTask) SetExecutingTime()

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) GetDurationInExecuting

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

func (*DescribeResourceGroupTask) GetDurationInQueue

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

func (*DescribeResourceGroupTask) ID

func (*DescribeResourceGroupTask) IsSubTask

func (bt *DescribeResourceGroupTask) IsSubTask() bool

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) SetExecutingTime

func (bt *DescribeResourceGroupTask) SetExecutingTime()

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) GetDurationInExecuting

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

func (*DropAliasTask) GetDurationInQueue

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

func (*DropAliasTask) ID

func (t *DropAliasTask) ID() UniqueID

ID returns the MsgID

func (*DropAliasTask) IsSubTask

func (bt *DropAliasTask) IsSubTask() bool

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) SetExecutingTime

func (bt *DropAliasTask) SetExecutingTime()

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) GetDurationInExecuting

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

func (*DropResourceGroupTask) GetDurationInQueue

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

func (*DropResourceGroupTask) ID

func (*DropResourceGroupTask) IsSubTask

func (bt *DropResourceGroupTask) IsSubTask() bool

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) SetExecutingTime

func (bt *DropResourceGroupTask) SetExecutingTime()

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 InterceptorImpl

type InterceptorImpl[Req Request, Resp Response] struct {
	// contains filtered or unexported fields
}

func NewInterceptor

func NewInterceptor[Req Request, Resp Response](proxy *Proxy, method string) (*InterceptorImpl[Req, Resp], error)

func (*InterceptorImpl[Req, Resp]) Call

func (i *InterceptorImpl[Req, Resp]) Call(ctx context.Context, request Req,
) (Resp, error)

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) GetDurationInExecuting

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

func (*ListAliasesTask) GetDurationInQueue

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

func (*ListAliasesTask) ID

func (a *ListAliasesTask) ID() UniqueID

func (*ListAliasesTask) IsSubTask

func (bt *ListAliasesTask) IsSubTask() bool

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) SetExecutingTime

func (bt *ListAliasesTask) SetExecutingTime()

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) GetDurationInExecuting

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

func (*ListResourceGroupsTask) GetDurationInQueue

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

func (*ListResourceGroupsTask) ID

func (*ListResourceGroupsTask) IsSubTask

func (bt *ListResourceGroupsTask) IsSubTask() bool

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) SetExecutingTime

func (bt *ListResourceGroupsTask) SetExecutingTime()

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 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(mixCoord types.MixCoordClient) (*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) 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) 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) HasDatabase

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

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, version uint64, removeVersion bool) []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)

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) 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) 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) HasDatabase

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

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

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, version uint64, removeVersion bool) []string

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

func (*MockCache) RemoveDatabase

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

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

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_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) 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) 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) 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) 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{}, version interface{}, removeVersion interface{}) *MockCache_RemoveCollectionsByID_Call

RemoveCollectionsByID is a helper method to define mock.On call

  • ctx context.Context
  • collectionID int64
  • version uint64
  • removeVersion bool

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

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_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_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_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 (_c *MockCache_RemoveCollectionsByID_Call) Run(run func(ctx context.Context, collectionID int64, version uint64, removeVersion bool)) *MockCache_RemoveCollectionsByID_Call

func (*MockCache_RemoveCollectionsByID_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 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_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_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 Node

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

func NewNode

func NewNode(info *nodeDef, t *searchTask) (*Node, error)

func (*Node) Run

func (n *Node) Run(ctx context.Context, span trace.Span, msg opMsg) (opMsg, error)

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, _ 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) AddCollectionField

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

AddCollectionField add a field to collection

func (*Proxy) AddCollectionFunction

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

func (*Proxy) AddFileResource

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

AddFileResource add file resource to rootcoord

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) AlterCollectionField

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

func (*Proxy) AlterCollectionFunction

func (node *Proxy) AlterCollectionFunction(ctx context.Context, request *milvuspb.AlterCollectionFunctionRequest) (*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) CheckQueryCoordBalanceStatus

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

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) CreateReplicateStream

func (node *Proxy) CreateReplicateStream(stream milvuspb.MilvusService_CreateReplicateStreamServer) (err error)

CreateReplicateStream establishes a replication stream on the target Milvus cluster.

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) DropCollectionFunction

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

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

func (node *Proxy) FlushAll(ctx context.Context, request *milvuspb.FlushAllRequest) (*milvuspb.FlushAllResponse, error)

Flush notify data nodes to persist the data of collection.

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) (resp *milvuspb.GetLoadStateResponse, err 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) GetReplicateInfo

func (node *Proxy) GetReplicateInfo(ctx context.Context, req *milvuspb.GetReplicateInfoRequest) (resp *milvuspb.GetReplicateInfoResponse, err error)

GetReplicateInfo retrieves replication-related metadata from a target Milvus cluster. TODO: sheep, only get target checkpoint

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) ListFileResources

ListFileResources list file resources from rootcoord

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) RemoveFileResource

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

RemoveFileResource remove file resource from rootcoord

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) RunAnalyzer

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) SetMixCoordClient

func (node *Proxy) SetMixCoordClient(cli types.MixCoordClient)

SetMixCoordClient sets MixCoord 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) 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) UpdateReplicateConfiguration

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

UpdateReplicateConfiguration applies a full replacement of the current replication configuration across Milvus clusters.

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 RemoteProxyServiceProvider

type RemoteProxyServiceProvider struct {
	*Proxy
}

func (*RemoteProxyServiceProvider) DescribeCollection

type Request

type Request interface {
	GetDbName() string
	GetCollectionName() string
}

type Response

type Response interface {
	GetStatus() *commonpb.Status
}

type RunAnalyzerTask

type RunAnalyzerTask struct {
	Condition
	*milvuspb.RunAnalyzerRequest
	// contains filtered or unexported fields
}

func (*RunAnalyzerTask) BeginTs

func (t *RunAnalyzerTask) BeginTs() Timestamp

func (*RunAnalyzerTask) CanSkipAllocTimestamp

func (bt *RunAnalyzerTask) CanSkipAllocTimestamp() bool

func (*RunAnalyzerTask) EndTs

func (t *RunAnalyzerTask) EndTs() Timestamp

func (*RunAnalyzerTask) Execute

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

func (*RunAnalyzerTask) GetDurationInExecuting

func (bt *RunAnalyzerTask) GetDurationInExecuting() time.Duration

func (*RunAnalyzerTask) GetDurationInQueue

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

func (*RunAnalyzerTask) ID

func (t *RunAnalyzerTask) ID() UniqueID

func (*RunAnalyzerTask) IsSubTask

func (bt *RunAnalyzerTask) IsSubTask() bool

func (*RunAnalyzerTask) Name

func (t *RunAnalyzerTask) Name() string

func (*RunAnalyzerTask) OnEnqueue

func (t *RunAnalyzerTask) OnEnqueue() error

func (*RunAnalyzerTask) PostExecute

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

func (*RunAnalyzerTask) PreExecute

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

func (*RunAnalyzerTask) SetExecutingTime

func (bt *RunAnalyzerTask) SetExecutingTime()

func (*RunAnalyzerTask) SetID

func (t *RunAnalyzerTask) SetID(uid UniqueID)

func (*RunAnalyzerTask) SetOnEnqueueTime

func (bt *RunAnalyzerTask) SetOnEnqueueTime()

func (*RunAnalyzerTask) SetTs

func (t *RunAnalyzerTask) SetTs(ts Timestamp)

func (*RunAnalyzerTask) TraceCtx

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

func (*RunAnalyzerTask) Type

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

type SearchInfo

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

type ServiceInterceptor

type ServiceInterceptor[Req Request, Resp Response] interface {
	Call(ctx context.Context, request Req) (Resp, error)
}

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 TaskStatsTracker

type TaskStatsTracker struct {
	TaskType       string
	MaxQueueTime   int64
	MinQueueTime   int64
	TotalQueueTime int64
	Count          int64
}

func NewTaskStatsTracker

func NewTaskStatsTracker(taskType string) *TaskStatsTracker

func (*TaskStatsTracker) AddSample

func (t *TaskStatsTracker) AddSample(queueTimeMs int64)

func (*TaskStatsTracker) AvgQueueTime

func (t *TaskStatsTracker) AvgQueueTime() int64

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) GetDurationInExecuting

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

func (*TransferNodeTask) GetDurationInQueue

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

func (*TransferNodeTask) ID

func (t *TransferNodeTask) ID() UniqueID

func (*TransferNodeTask) IsSubTask

func (bt *TransferNodeTask) IsSubTask() bool

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) SetExecutingTime

func (bt *TransferNodeTask) SetExecutingTime()

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) GetDurationInExecuting

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

func (*TransferReplicaTask) GetDurationInQueue

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

func (*TransferReplicaTask) ID

func (t *TransferReplicaTask) ID() UniqueID

func (*TransferReplicaTask) IsSubTask

func (bt *TransferReplicaTask) IsSubTask() bool

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) SetExecutingTime

func (bt *TransferReplicaTask) SetExecutingTime()

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) GetDurationInExecuting

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

func (*UpdateResourceGroupsTask) GetDurationInQueue

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

func (*UpdateResourceGroupsTask) ID

func (*UpdateResourceGroupsTask) IsSubTask

func (bt *UpdateResourceGroupsTask) IsSubTask() bool

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) SetExecutingTime

func (bt *UpdateResourceGroupsTask) SetExecutingTime()

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