Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BackupUsage ¶
type BackupUsage struct {
// The ID of the backup
ID string `json:"id"`
// The completion time of the backup
CompletionTime string `json:"completion_time"`
// The size of the backup in GiB
SizeInGib float64 `json:"size_in_gib"`
// The type of backup
Type string `json:"type"`
// The list of collections included in the backup
Collections []string `json:"collections"`
}
BackupUsage represents metrics for a single backup
type CollectionUsage ¶
type CollectionUsage struct {
// The name of the collection
Name string `json:"name"`
// The replication factor of the collection
ReplicationFactor int `json:"replication_factor"`
// The number of unique shards in the collection
UniqueShardCount int `json:"unique_shard_count"`
// List of shards and their metrics
Shards []*ShardUsage `json:"shards"`
}
CollectionUsage represents metrics for a single collection
type Dimensionality ¶
type Dimensionality struct {
// The dimensionality of the vectors
Dimensionality int `json:"dimensionality"`
// The number of objects with this dimensionality
Count int `json:"count"`
}
Dimensionality represents metrics for a specific dimensionality
type MockService ¶
MockService is an autogenerated mock type for the Service type
func NewMockService ¶
func NewMockService(t interface {
mock.TestingT
Cleanup(func())
}) *MockService
NewMockService creates a new instance of MockService. 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 (*MockService) EXPECT ¶
func (_m *MockService) EXPECT() *MockService_Expecter
type MockService_Expecter ¶
type MockService_Expecter struct {
// contains filtered or unexported fields
}
func (*MockService_Expecter) Usage ¶
func (_e *MockService_Expecter) Usage(ctx interface{}) *MockService_Usage_Call
Usage is a helper method to define mock.On call
- ctx context.Context
type MockService_Usage_Call ¶
MockService_Usage_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Usage'
func (*MockService_Usage_Call) Return ¶
func (_c *MockService_Usage_Call) Return(_a0 *Report, _a1 error) *MockService_Usage_Call
func (*MockService_Usage_Call) Run ¶
func (_c *MockService_Usage_Call) Run(run func(ctx context.Context)) *MockService_Usage_Call
func (*MockService_Usage_Call) RunAndReturn ¶
func (_c *MockService_Usage_Call) RunAndReturn(run func(context.Context) (*Report, error)) *MockService_Usage_Call
type Report ¶
type Report struct {
// The version of usage policy, date based versioning
// e.g. 2025-06-01
Version string `json:"version"`
// The name of the node
Node string `json:"node"`
// List of collections and their metrics
Collections []*CollectionUsage `json:"collections"`
// List of backups and their metrics
Backups []*BackupUsage `json:"backups"`
}
Report represents the usage metrics report from the metrics endpoint
type Service ¶
func NewService ¶
func NewService(schemaManager schema.SchemaGetter, db db.IndexGetter, backups backup.BackupBackendProvider) Service
type ShardUsage ¶
type ShardUsage struct {
// The name of the shard
Name string `json:"name"`
// The number of objects in the shard
ObjectsCount int `json:"objects_count"`
// The storage size in bytes
ObjectsStorageBytes uint64 `json:"objects_storage_bytes"`
// The actual memory storage bytes used by vectors
VectorStorageBytes uint64 `json:"vector_storage_bytes"`
// List of named vectors and their metrics
NamedVectors []*VectorUsage `json:"named_vectors"`
}
ShardUsage represents metrics for a single shard
type VectorUsage ¶
type VectorUsage struct {
// The name of the vector
Name string `json:"name"`
// The type of vector index
VectorIndexType string `json:"vectorIndexType"`
// The compression type used
Compression string `json:"compression"`
// The compression ratio achieved
VectorCompressionRatio float64 `json:"vector_compression_ratio"`
// The actual memory storage bytes used by vectors
VectorStorageBytes int64 `json:"vector_storage_bytes"`
// List of dimensionalities and their metrics
Dimensionalities []*Dimensionality `json:"dimensionalities"`
}
VectorUsage represents metrics for a single vector index