clients

package
v1.32.21 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2025 License: BSD-3-Clause Imports: 33 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AsyncReplicationTargetNodeEndpoint added in v1.32.0

func AsyncReplicationTargetNodeEndpoint(indexName, shardName string) string

func NewReplicationClient

func NewReplicationClient(httpClient *http.Client) replica.Client

Types

type ClusterBackups

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

func NewClusterBackups

func NewClusterBackups(client *http.Client) *ClusterBackups

func (*ClusterBackups) Abort

func (c *ClusterBackups) Abort(_ context.Context,
	host string, req *backup.AbortRequest,
) error

func (*ClusterBackups) CanCommit

func (c *ClusterBackups) CanCommit(ctx context.Context,
	host string, req *backup.Request,
) (*backup.CanCommitResponse, error)

func (*ClusterBackups) Commit

func (c *ClusterBackups) Commit(ctx context.Context,
	host string, req *backup.StatusRequest,
) error

func (*ClusterBackups) Status

type ClusterClassifications

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

func NewClusterClassifications

func NewClusterClassifications(httpClient *http.Client) *ClusterClassifications

func (*ClusterClassifications) AbortTransaction

func (c *ClusterClassifications) AbortTransaction(ctx context.Context, host string,
	tx *cluster.Transaction,
) error

func (*ClusterClassifications) CommitTransaction

func (c *ClusterClassifications) CommitTransaction(ctx context.Context, host string,
	tx *cluster.Transaction,
) error

func (*ClusterClassifications) OpenTransaction

func (c *ClusterClassifications) OpenTransaction(ctx context.Context, host string,
	tx *cluster.Transaction,
) error

type RemoteIndex

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

func NewRemoteIndex

func NewRemoteIndex(httpClient *http.Client) *RemoteIndex

func (*RemoteIndex) AddAsyncReplicationTargetNode added in v1.31.0

func (c *RemoteIndex) AddAsyncReplicationTargetNode(
	ctx context.Context,
	hostName, indexName, shardName string,
	targetNodeOverride additional.AsyncReplicationTargetNodeOverride,
	schemaVersion uint64,
) error

AddAsyncReplicationTargetNode configures and starts async replication for the given host with the specified override.

func (*RemoteIndex) Aggregate

func (c *RemoteIndex) Aggregate(ctx context.Context, hostName, index,
	shard string, params aggregation.Params,
) (*aggregation.Result, error)

func (*RemoteIndex) BatchAddReferences

func (c *RemoteIndex) BatchAddReferences(ctx context.Context, hostName, indexName,
	shardName string, refs objects.BatchReferences, schemaVersion uint64,
) []error

func (*RemoteIndex) BatchPutObjects

func (c *RemoteIndex) BatchPutObjects(ctx context.Context, host, index,
	shard string, objs []*storobj.Object, _ *additional.ReplicationProperties, schemaVersion uint64,
) []error

func (*RemoteIndex) CreateShard

func (c *RemoteIndex) CreateShard(ctx context.Context,
	hostName, indexName, shardName string,
) error

func (*RemoteIndex) DeleteObject

func (c *RemoteIndex) DeleteObject(ctx context.Context, hostName, indexName,
	shardName string, id strfmt.UUID, deletionTime time.Time, schemaVersion uint64,
) error

func (*RemoteIndex) DeleteObjectBatch

func (c *RemoteIndex) DeleteObjectBatch(ctx context.Context, hostName, indexName, shardName string,
	uuids []strfmt.UUID, deletionTime time.Time, dryRun bool, schemaVersion uint64,
) objects.BatchSimpleObjects

func (*RemoteIndex) Exists

func (c *RemoteIndex) Exists(ctx context.Context, hostName, indexName,
	shardName string, id strfmt.UUID,
) (bool, error)

func (*RemoteIndex) FindUUIDs added in v1.22.8

func (c *RemoteIndex) FindUUIDs(ctx context.Context, hostName, indexName,
	shardName string, filters *filters.LocalFilter,
) ([]strfmt.UUID, error)

func (*RemoteIndex) GetFile added in v1.31.0

func (c *RemoteIndex) GetFile(ctx context.Context, hostName, indexName,
	shardName, relativeFilePath string,
) (io.ReadCloser, error)

GetFile caller must close the returned io.ReadCloser if no error is returned. indexName is the collection name. relativeFilePath is the path to the file relative to the shard's root directory.

func (*RemoteIndex) GetFileMetadata added in v1.31.0

func (c *RemoteIndex) GetFileMetadata(ctx context.Context, hostName, indexName,
	shardName, relativeFilePath string,
) (file.FileMetadata, error)

GetFileMetadata returns file info to the file relative to the shard's root directory.

func (*RemoteIndex) GetObject

func (c *RemoteIndex) GetObject(ctx context.Context, hostName, indexName,
	shardName string, id strfmt.UUID, selectProps search.SelectProperties,
	additional additional.Properties,
) (*storobj.Object, error)

func (*RemoteIndex) GetShardQueueSize added in v1.22.0

func (c *RemoteIndex) GetShardQueueSize(ctx context.Context,
	hostName, indexName, shardName string,
) (int64, error)

func (*RemoteIndex) GetShardStatus

func (c *RemoteIndex) GetShardStatus(ctx context.Context,
	hostName, indexName, shardName string,
) (string, error)

func (*RemoteIndex) IncreaseReplicationFactor

func (c *RemoteIndex) IncreaseReplicationFactor(ctx context.Context,
	hostName, indexName string, dist scaler.ShardDist,
) error

func (*RemoteIndex) ListFiles added in v1.31.0

func (c *RemoteIndex) ListFiles(ctx context.Context,
	hostName, indexName, shardName string,
) ([]string, error)

ListFiles returns a list of files that can be used to get the shard data at the time the pause was requested. The returned relative file paths are relative to the shard's root directory. indexName is the collection name.

func (*RemoteIndex) MergeObject

func (c *RemoteIndex) MergeObject(ctx context.Context, hostName, indexName,
	shardName string, mergeDoc objects.MergeDocument, schemaVersion uint64,
) error

func (*RemoteIndex) MultiGetObjects

func (c *RemoteIndex) MultiGetObjects(ctx context.Context, hostName, indexName,
	shardName string, ids []strfmt.UUID,
) ([]*storobj.Object, error)

func (*RemoteIndex) PauseFileActivity added in v1.31.0

func (c *RemoteIndex) PauseFileActivity(ctx context.Context,
	hostName, indexName, shardName string, schemaVersion uint64,
) error

PauseFileActivity pauses the collection's shard replica background processes on the specified host. You should explicitly resume the background processes once you're done with the files.

func (*RemoteIndex) PutFile

func (c *RemoteIndex) PutFile(ctx context.Context, hostName, indexName,
	shardName, fileName string, payload io.ReadSeekCloser,
) error

func (*RemoteIndex) PutObject

func (c *RemoteIndex) PutObject(ctx context.Context, host, index,
	shard string, obj *storobj.Object, schemaVersion uint64,
) error

func (*RemoteIndex) ReInitShard

func (c *RemoteIndex) ReInitShard(ctx context.Context,
	hostName, indexName, shardName string,
) error

func (*RemoteIndex) RemoveAsyncReplicationTargetNode added in v1.31.0

func (c *RemoteIndex) RemoveAsyncReplicationTargetNode(
	ctx context.Context,
	hostName, indexName, shardName string,
	targetNodeOverride additional.AsyncReplicationTargetNodeOverride,
) error

RemoveAsyncReplicationTargetNode removes the given target node override for async replication.

func (*RemoteIndex) ResumeFileActivity added in v1.31.0

func (c *RemoteIndex) ResumeFileActivity(ctx context.Context,
	hostName, indexName, shardName string,
) error

ResumeFileActivity resumes the collection's shard replica background processes on the specified host

func (*RemoteIndex) SearchShard

func (c *RemoteIndex) SearchShard(ctx context.Context, host, index, shard string,
	vector []models.Vector,
	targetVector []string,
	distance float32,
	limit int,
	filters *filters.LocalFilter,
	keywordRanking *searchparams.KeywordRanking,
	sort []filters.Sort,
	cursor *filters.Cursor,
	groupBy *searchparams.GroupBy,
	additional additional.Properties,
	targetCombination *dto.TargetCombination,
	properties []string,
) ([]*storobj.Object, []float32, error)

func (*RemoteIndex) UpdateShardStatus

func (c *RemoteIndex) UpdateShardStatus(ctx context.Context, hostName, indexName, shardName,
	targetStatus string, schemaVersion uint64,
) error

type RemoteNode

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

func NewRemoteNode

func NewRemoteNode(httpClient *http.Client) *RemoteNode

func (*RemoteNode) GetNodeStatus

func (c *RemoteNode) GetNodeStatus(ctx context.Context, hostName, className, shardName, output string) (*models.NodeStatus, error)

func (*RemoteNode) GetStatistics added in v1.25.0

func (c *RemoteNode) GetStatistics(ctx context.Context, hostName string) (*models.Statistics, error)

type RemoteUser added in v1.30.1

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

func NewRemoteUser added in v1.30.1

func NewRemoteUser(httpClient *http.Client, nodeResolver nodeResolver) *RemoteUser

func (*RemoteUser) GetAndUpdateLastUsedTime added in v1.30.1

func (c *RemoteUser) GetAndUpdateLastUsedTime(ctx context.Context, nodeName string, users map[string]time.Time, returnStatus bool) (*apikey.UserStatusResponse, error)

Jump to

Keyboard shortcuts

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