Documentation ¶
Index ¶
- Variables
- func ConnectTimeoutOption(timeout int) config.Option[*MilvusDataHandler]
- func DecodePwd(pwd string) (string, error)
- func DialConfigOption(dialConfig util.DialConfig) config.Option[*MilvusDataHandler]
- func IgnorePartitionOption(ignore bool) config.Option[*MilvusDataHandler]
- func KafkaAddressOption(address string) config.Option[*KafkaDataHandler]
- func KafkaEnableSASLOption(enableSASL bool) config.Option[*KafkaDataHandler]
- func KafkaSecurityOption(sasl KafkaSASLParam) config.Option[*KafkaDataHandler]
- func KafkaTopicOption(topic string) config.Option[*KafkaDataHandler]
- func NewChannelWriter(dataHandler api.DataHandler, writerConfig config.WriterConfig, ...) api.Writer
- func NewReplicateMessageManager(handler api.DataHandler, messageBufferSize int) api.MessageManager
- func TokenOption(token string) config.Option[*MilvusDataHandler]
- func URIOption(uri string) config.Option[*MilvusDataHandler]
- func UpdateMsgBase(msgBase *commonpb.MsgBase, withReplicateInfo *commonpb.MsgBase)
- type ChannelWriter
- func (c *ChannelWriter) HandleOpMessagePack(ctx context.Context, msgPack *msgstream.MsgPack) ([]byte, error)
- func (c *ChannelWriter) HandleReplicateAPIEvent(ctx context.Context, apiEvent *api.ReplicateAPIEvent) error
- func (c *ChannelWriter) HandleReplicateMessage(ctx context.Context, channelName string, msgPack *msgstream.MsgPack) ([]byte, []byte, error)
- func (c *ChannelWriter) UpdateNameMappings(nameMappings map[string]string)
- func (c *ChannelWriter) WaitCollectionReady(ctx context.Context, collectionName, databaseName string, msgTs uint64) InfoState
- func (c *ChannelWriter) WaitDatabaseReady(ctx context.Context, databaseName string, msgTs uint64, collectionName string) InfoState
- func (c *ChannelWriter) WaitObjReady(ctx context.Context, db, collection, partition string, ts uint64) (bool, error)
- func (c *ChannelWriter) WaitObjReadyForAPIEvent(ctx context.Context, apiEvent *api.ReplicateAPIEvent, ...) (bool, error)
- func (c *ChannelWriter) WaitPartitionReady(ctx context.Context, collectionName, partitionName, databaseName string, ...) InfoState
- type ErrorProtect
- type InfoState
- type KafkaDataFormatter
- type KafkaDataHandler
- func (k *KafkaDataHandler) AlterDatabase(ctx context.Context, param *api.AlterDatabaseParam) error
- func (k *KafkaDataHandler) AlterIndex(ctx context.Context, param *api.AlterIndexParam) error
- func (k *KafkaDataHandler) CreateCollection(ctx context.Context, param *api.CreateCollectionParam) error
- func (k *KafkaDataHandler) CreateDatabase(ctx context.Context, param *api.CreateDatabaseParam) error
- func (k *KafkaDataHandler) CreateIndex(ctx context.Context, param *api.CreateIndexParam) error
- func (k *KafkaDataHandler) CreatePartition(ctx context.Context, param *api.CreatePartitionParam) error
- func (k *KafkaDataHandler) CreateRole(ctx context.Context, param *api.CreateRoleParam) error
- func (k *KafkaDataHandler) CreateUser(ctx context.Context, param *api.CreateUserParam) error
- func (k *KafkaDataHandler) Delete(ctx context.Context, param *api.DeleteParam) error
- func (k *KafkaDataHandler) DeleteUser(ctx context.Context, param *api.DeleteUserParam) error
- func (k *KafkaDataHandler) DropCollection(ctx context.Context, param *api.DropCollectionParam) error
- func (k *KafkaDataHandler) DropDatabase(ctx context.Context, param *api.DropDatabaseParam) error
- func (k *KafkaDataHandler) DropIndex(ctx context.Context, param *api.DropIndexParam) error
- func (k *KafkaDataHandler) DropPartition(ctx context.Context, param *api.DropPartitionParam) error
- func (k *KafkaDataHandler) DropRole(ctx context.Context, param *api.DropRoleParam) error
- func (k *KafkaDataHandler) Flush(ctx context.Context, param *api.FlushParam) error
- func (k *KafkaDataHandler) Insert(ctx context.Context, param *api.InsertParam) error
- func (k *KafkaDataHandler) KafkaOp(ctx context.Context, database string, ...) error
- func (k *KafkaDataHandler) LoadCollection(ctx context.Context, param *api.LoadCollectionParam) error
- func (k *KafkaDataHandler) LoadPartitions(ctx context.Context, param *api.LoadPartitionsParam) error
- func (k *KafkaDataHandler) OperatePrivilege(ctx context.Context, param *api.OperatePrivilegeParam) error
- func (k *KafkaDataHandler) OperateUserRole(ctx context.Context, param *api.OperateUserRoleParam) error
- func (k *KafkaDataHandler) ReleaseCollection(ctx context.Context, param *api.ReleaseCollectionParam) error
- func (k *KafkaDataHandler) ReleasePartitions(ctx context.Context, param *api.ReleasePartitionsParam) error
- func (k *KafkaDataHandler) ReplicateMessage(ctx context.Context, param *api.ReplicateMessageParam) error
- func (k *KafkaDataHandler) UpdateUser(ctx context.Context, param *api.UpdateUserParam) error
- type KafkaFormat
- type KafkaMsg
- type KafkaSASLParam
- type MilvusDataHandler
- func (m *MilvusDataHandler) AlterDatabase(ctx context.Context, param *api.AlterDatabaseParam) error
- func (m *MilvusDataHandler) AlterIndex(ctx context.Context, param *api.AlterIndexParam) error
- func (m *MilvusDataHandler) CreateCollection(ctx context.Context, param *api.CreateCollectionParam) error
- func (m *MilvusDataHandler) CreateDatabase(ctx context.Context, param *api.CreateDatabaseParam) error
- func (m *MilvusDataHandler) CreateIndex(ctx context.Context, param *api.CreateIndexParam) error
- func (m *MilvusDataHandler) CreatePartition(ctx context.Context, param *api.CreatePartitionParam) error
- func (m *MilvusDataHandler) CreateRole(ctx context.Context, param *api.CreateRoleParam) error
- func (m *MilvusDataHandler) CreateUser(ctx context.Context, param *api.CreateUserParam) error
- func (m *MilvusDataHandler) Delete(ctx context.Context, param *api.DeleteParam) error
- func (m *MilvusDataHandler) DeleteUser(ctx context.Context, param *api.DeleteUserParam) error
- func (m *MilvusDataHandler) DescribeCollection(ctx context.Context, param *api.DescribeCollectionParam) error
- func (m *MilvusDataHandler) DescribeDatabase(ctx context.Context, param *api.DescribeDatabaseParam) error
- func (m *MilvusDataHandler) DescribePartition(ctx context.Context, param *api.DescribePartitionParam) error
- func (m *MilvusDataHandler) DropCollection(ctx context.Context, param *api.DropCollectionParam) error
- func (m *MilvusDataHandler) DropDatabase(ctx context.Context, param *api.DropDatabaseParam) error
- func (m *MilvusDataHandler) DropIndex(ctx context.Context, param *api.DropIndexParam) error
- func (m *MilvusDataHandler) DropPartition(ctx context.Context, param *api.DropPartitionParam) error
- func (m *MilvusDataHandler) DropRole(ctx context.Context, param *api.DropRoleParam) error
- func (m *MilvusDataHandler) Flush(ctx context.Context, param *api.FlushParam) error
- func (m *MilvusDataHandler) GetObjectType(o string) (entity.PriviledgeObjectType, error)
- func (m *MilvusDataHandler) Insert(ctx context.Context, param *api.InsertParam) error
- func (m *MilvusDataHandler) LoadCollection(ctx context.Context, param *api.LoadCollectionParam) error
- func (m *MilvusDataHandler) LoadPartitions(ctx context.Context, param *api.LoadPartitionsParam) error
- func (m *MilvusDataHandler) OperatePrivilege(ctx context.Context, param *api.OperatePrivilegeParam) error
- func (m *MilvusDataHandler) OperateUserRole(ctx context.Context, param *api.OperateUserRoleParam) error
- func (m *MilvusDataHandler) ReleaseCollection(ctx context.Context, param *api.ReleaseCollectionParam) error
- func (m *MilvusDataHandler) ReleasePartitions(ctx context.Context, param *api.ReleasePartitionsParam) error
- func (m *MilvusDataHandler) ReplicateMessage(ctx context.Context, param *api.ReplicateMessageParam) error
- func (m *MilvusDataHandler) UpdateUser(ctx context.Context, param *api.UpdateUserParam) error
Constants ¶
This section is empty.
Variables ¶
View Source
var FastFail = func() *ErrorProtect { return NewErrorProtect(1, time.Minute) }
Functions ¶
func ConnectTimeoutOption ¶
func ConnectTimeoutOption(timeout int) config.Option[*MilvusDataHandler]
func DialConfigOption ¶
func DialConfigOption(dialConfig util.DialConfig) config.Option[*MilvusDataHandler]
func IgnorePartitionOption ¶
func IgnorePartitionOption(ignore bool) config.Option[*MilvusDataHandler]
func KafkaAddressOption ¶
func KafkaAddressOption(address string) config.Option[*KafkaDataHandler]
func KafkaEnableSASLOption ¶
func KafkaEnableSASLOption(enableSASL bool) config.Option[*KafkaDataHandler]
func KafkaSecurityOption ¶
func KafkaSecurityOption(sasl KafkaSASLParam) config.Option[*KafkaDataHandler]
func KafkaTopicOption ¶
func KafkaTopicOption(topic string) config.Option[*KafkaDataHandler]
func NewChannelWriter ¶
func NewChannelWriter(dataHandler api.DataHandler, writerConfig config.WriterConfig, droppedObjs map[string]map[string]uint64, downstream string, ) api.Writer
func NewReplicateMessageManager ¶
func NewReplicateMessageManager(handler api.DataHandler, messageBufferSize int) api.MessageManager
func TokenOption ¶
func TokenOption(token string) config.Option[*MilvusDataHandler]
Types ¶
type ChannelWriter ¶
type ChannelWriter struct {
// contains filtered or unexported fields
}
func (*ChannelWriter) HandleOpMessagePack ¶
func (*ChannelWriter) HandleReplicateAPIEvent ¶
func (c *ChannelWriter) HandleReplicateAPIEvent(ctx context.Context, apiEvent *api.ReplicateAPIEvent) error
func (*ChannelWriter) HandleReplicateMessage ¶
func (*ChannelWriter) UpdateNameMappings ¶
func (c *ChannelWriter) UpdateNameMappings(nameMappings map[string]string)
func (*ChannelWriter) WaitCollectionReady ¶
func (*ChannelWriter) WaitDatabaseReady ¶
func (c *ChannelWriter) WaitDatabaseReady(ctx context.Context, databaseName string, msgTs uint64, collectionName string) InfoState
WaitDatabaseReady wait for database ready, return value: skip the op or not, wait timeout or not
func (*ChannelWriter) WaitObjReady ¶
func (*ChannelWriter) WaitObjReadyForAPIEvent ¶
func (c *ChannelWriter) WaitObjReadyForAPIEvent(ctx context.Context, apiEvent *api.ReplicateAPIEvent, waitDatabase, waitCollection, waitPartition bool) (bool, error)
WaitObjReadyForAPIEvent wait database/collection/partition ready, return value: skip the op or not, and error
func (*ChannelWriter) WaitPartitionReady ¶
type ErrorProtect ¶
type ErrorProtect struct {
// contains filtered or unexported fields
}
ErrorProtect avoid to occur a lot of errors in the short time
func NewErrorProtect ¶
func NewErrorProtect(per int32, unit time.Duration) *ErrorProtect
func (*ErrorProtect) Chan ¶
func (e *ErrorProtect) Chan() <-chan struct{}
func (*ErrorProtect) Inc ¶
func (e *ErrorProtect) Inc()
func (*ErrorProtect) Info ¶
func (e *ErrorProtect) Info() string
type KafkaDataFormatter ¶
type KafkaDataFormatter struct {
api.DataFormatter
}
func NewKafkaFormatter ¶
func NewKafkaFormatter() *KafkaDataFormatter
type KafkaDataHandler ¶
type KafkaDataHandler struct { api.DataHandler // contains filtered or unexported fields }
func NewKafkaDataHandler ¶
func NewKafkaDataHandler(options ...config.Option[*KafkaDataHandler]) (*KafkaDataHandler, error)
NewKafkaDataHandler returns a singleton KafkaDataHandler
func (*KafkaDataHandler) AlterDatabase ¶
func (k *KafkaDataHandler) AlterDatabase(ctx context.Context, param *api.AlterDatabaseParam) error
func (*KafkaDataHandler) AlterIndex ¶
func (k *KafkaDataHandler) AlterIndex(ctx context.Context, param *api.AlterIndexParam) error
func (*KafkaDataHandler) CreateCollection ¶
func (k *KafkaDataHandler) CreateCollection(ctx context.Context, param *api.CreateCollectionParam) error
func (*KafkaDataHandler) CreateDatabase ¶
func (k *KafkaDataHandler) CreateDatabase(ctx context.Context, param *api.CreateDatabaseParam) error
func (*KafkaDataHandler) CreateIndex ¶
func (k *KafkaDataHandler) CreateIndex(ctx context.Context, param *api.CreateIndexParam) error
func (*KafkaDataHandler) CreatePartition ¶
func (k *KafkaDataHandler) CreatePartition(ctx context.Context, param *api.CreatePartitionParam) error
func (*KafkaDataHandler) CreateRole ¶
func (k *KafkaDataHandler) CreateRole(ctx context.Context, param *api.CreateRoleParam) error
func (*KafkaDataHandler) CreateUser ¶
func (k *KafkaDataHandler) CreateUser(ctx context.Context, param *api.CreateUserParam) error
rbac messages
func (*KafkaDataHandler) Delete ¶
func (k *KafkaDataHandler) Delete(ctx context.Context, param *api.DeleteParam) error
func (*KafkaDataHandler) DeleteUser ¶
func (k *KafkaDataHandler) DeleteUser(ctx context.Context, param *api.DeleteUserParam) error
func (*KafkaDataHandler) DropCollection ¶
func (k *KafkaDataHandler) DropCollection(ctx context.Context, param *api.DropCollectionParam) error
func (*KafkaDataHandler) DropDatabase ¶
func (k *KafkaDataHandler) DropDatabase(ctx context.Context, param *api.DropDatabaseParam) error
func (*KafkaDataHandler) DropIndex ¶
func (k *KafkaDataHandler) DropIndex(ctx context.Context, param *api.DropIndexParam) error
func (*KafkaDataHandler) DropPartition ¶
func (k *KafkaDataHandler) DropPartition(ctx context.Context, param *api.DropPartitionParam) error
func (*KafkaDataHandler) DropRole ¶
func (k *KafkaDataHandler) DropRole(ctx context.Context, param *api.DropRoleParam) error
func (*KafkaDataHandler) Flush ¶
func (k *KafkaDataHandler) Flush(ctx context.Context, param *api.FlushParam) error
func (*KafkaDataHandler) Insert ¶
func (k *KafkaDataHandler) Insert(ctx context.Context, param *api.InsertParam) error
func (*KafkaDataHandler) LoadCollection ¶
func (k *KafkaDataHandler) LoadCollection(ctx context.Context, param *api.LoadCollectionParam) error
func (*KafkaDataHandler) LoadPartitions ¶
func (k *KafkaDataHandler) LoadPartitions(ctx context.Context, param *api.LoadPartitionsParam) error
func (*KafkaDataHandler) OperatePrivilege ¶
func (k *KafkaDataHandler) OperatePrivilege(ctx context.Context, param *api.OperatePrivilegeParam) error
func (*KafkaDataHandler) OperateUserRole ¶
func (k *KafkaDataHandler) OperateUserRole(ctx context.Context, param *api.OperateUserRoleParam) error
func (*KafkaDataHandler) ReleaseCollection ¶
func (k *KafkaDataHandler) ReleaseCollection(ctx context.Context, param *api.ReleaseCollectionParam) error
func (*KafkaDataHandler) ReleasePartitions ¶
func (k *KafkaDataHandler) ReleasePartitions(ctx context.Context, param *api.ReleasePartitionsParam) error
func (*KafkaDataHandler) ReplicateMessage ¶
func (k *KafkaDataHandler) ReplicateMessage(ctx context.Context, param *api.ReplicateMessageParam) error
func (*KafkaDataHandler) UpdateUser ¶
func (k *KafkaDataHandler) UpdateUser(ctx context.Context, param *api.UpdateUserParam) error
type KafkaFormat ¶
type KafkaSASLParam ¶
type KafkaSASLParam struct {
// contains filtered or unexported fields
}
type MilvusDataHandler ¶
type MilvusDataHandler struct { api.DataHandler // contains filtered or unexported fields }
func NewMilvusDataHandler ¶
func NewMilvusDataHandler(options ...config.Option[*MilvusDataHandler]) (*MilvusDataHandler, error)
func (*MilvusDataHandler) AlterDatabase ¶
func (m *MilvusDataHandler) AlterDatabase(ctx context.Context, param *api.AlterDatabaseParam) error
func (*MilvusDataHandler) AlterIndex ¶
func (m *MilvusDataHandler) AlterIndex(ctx context.Context, param *api.AlterIndexParam) error
func (*MilvusDataHandler) CreateCollection ¶
func (m *MilvusDataHandler) CreateCollection(ctx context.Context, param *api.CreateCollectionParam) error
func (*MilvusDataHandler) CreateDatabase ¶
func (m *MilvusDataHandler) CreateDatabase(ctx context.Context, param *api.CreateDatabaseParam) error
func (*MilvusDataHandler) CreateIndex ¶
func (m *MilvusDataHandler) CreateIndex(ctx context.Context, param *api.CreateIndexParam) error
func (*MilvusDataHandler) CreatePartition ¶
func (m *MilvusDataHandler) CreatePartition(ctx context.Context, param *api.CreatePartitionParam) error
func (*MilvusDataHandler) CreateRole ¶
func (m *MilvusDataHandler) CreateRole(ctx context.Context, param *api.CreateRoleParam) error
func (*MilvusDataHandler) CreateUser ¶
func (m *MilvusDataHandler) CreateUser(ctx context.Context, param *api.CreateUserParam) error
func (*MilvusDataHandler) Delete ¶
func (m *MilvusDataHandler) Delete(ctx context.Context, param *api.DeleteParam) error
func (*MilvusDataHandler) DeleteUser ¶
func (m *MilvusDataHandler) DeleteUser(ctx context.Context, param *api.DeleteUserParam) error
func (*MilvusDataHandler) DescribeCollection ¶
func (m *MilvusDataHandler) DescribeCollection(ctx context.Context, param *api.DescribeCollectionParam) error
func (*MilvusDataHandler) DescribeDatabase ¶
func (m *MilvusDataHandler) DescribeDatabase(ctx context.Context, param *api.DescribeDatabaseParam) error
func (*MilvusDataHandler) DescribePartition ¶
func (m *MilvusDataHandler) DescribePartition(ctx context.Context, param *api.DescribePartitionParam) error
func (*MilvusDataHandler) DropCollection ¶
func (m *MilvusDataHandler) DropCollection(ctx context.Context, param *api.DropCollectionParam) error
func (*MilvusDataHandler) DropDatabase ¶
func (m *MilvusDataHandler) DropDatabase(ctx context.Context, param *api.DropDatabaseParam) error
func (*MilvusDataHandler) DropIndex ¶
func (m *MilvusDataHandler) DropIndex(ctx context.Context, param *api.DropIndexParam) error
func (*MilvusDataHandler) DropPartition ¶
func (m *MilvusDataHandler) DropPartition(ctx context.Context, param *api.DropPartitionParam) error
func (*MilvusDataHandler) DropRole ¶
func (m *MilvusDataHandler) DropRole(ctx context.Context, param *api.DropRoleParam) error
func (*MilvusDataHandler) Flush ¶
func (m *MilvusDataHandler) Flush(ctx context.Context, param *api.FlushParam) error
func (*MilvusDataHandler) GetObjectType ¶
func (m *MilvusDataHandler) GetObjectType(o string) (entity.PriviledgeObjectType, error)
func (*MilvusDataHandler) Insert ¶
func (m *MilvusDataHandler) Insert(ctx context.Context, param *api.InsertParam) error
func (*MilvusDataHandler) LoadCollection ¶
func (m *MilvusDataHandler) LoadCollection(ctx context.Context, param *api.LoadCollectionParam) error
func (*MilvusDataHandler) LoadPartitions ¶
func (m *MilvusDataHandler) LoadPartitions(ctx context.Context, param *api.LoadPartitionsParam) error
func (*MilvusDataHandler) OperatePrivilege ¶
func (m *MilvusDataHandler) OperatePrivilege(ctx context.Context, param *api.OperatePrivilegeParam) error
func (*MilvusDataHandler) OperateUserRole ¶
func (m *MilvusDataHandler) OperateUserRole(ctx context.Context, param *api.OperateUserRoleParam) error
func (*MilvusDataHandler) ReleaseCollection ¶
func (m *MilvusDataHandler) ReleaseCollection(ctx context.Context, param *api.ReleaseCollectionParam) error
func (*MilvusDataHandler) ReleasePartitions ¶
func (m *MilvusDataHandler) ReleasePartitions(ctx context.Context, param *api.ReleasePartitionsParam) error
func (*MilvusDataHandler) ReplicateMessage ¶
func (m *MilvusDataHandler) ReplicateMessage(ctx context.Context, param *api.ReplicateMessageParam) error
func (*MilvusDataHandler) UpdateUser ¶
func (m *MilvusDataHandler) UpdateUser(ctx context.Context, param *api.UpdateUserParam) error
Click to show internal directories.
Click to hide internal directories.