Documentation ¶
Index ¶
- type Catalog
- func (tc *Catalog) CheckCollection(ctx context.Context, collectionID types.UniqueID) (bool, error)
- func (tc *Catalog) CreateCollection(ctx context.Context, createCollection *model.CreateCollection, ...) (*model.Collection, bool, error)
- func (tc *Catalog) CreateCollectionAndSegments(ctx context.Context, createCollection *model.CreateCollection, ...) (*model.Collection, bool, error)
- func (tc *Catalog) CreateDatabase(ctx context.Context, createDatabase *model.CreateDatabase, ts types.Timestamp) (*model.Database, error)
- func (tc *Catalog) CreateSegment(ctx context.Context, createSegment *model.CreateSegment, ts types.Timestamp) (*model.Segment, error)
- func (tc *Catalog) CreateTenant(ctx context.Context, createTenant *model.CreateTenant, ts types.Timestamp) (*model.Tenant, error)
- func (tc *Catalog) DeleteCollection(ctx context.Context, deleteCollection *model.DeleteCollection, softDelete bool) error
- func (tc *Catalog) DeleteSegment(ctx context.Context, segmentID types.UniqueID, collectionID types.UniqueID) error
- func (tc *Catalog) FlushCollectionCompaction(ctx context.Context, ...) (*model.FlushCollectionInfo, error)
- func (tc *Catalog) GetAllDatabases(ctx context.Context, ts types.Timestamp) ([]*model.Database, error)
- func (tc *Catalog) GetAllTenants(ctx context.Context, ts types.Timestamp) ([]*model.Tenant, error)
- func (tc *Catalog) GetCollections(ctx context.Context, collectionID types.UniqueID, collectionName *string, ...) ([]*model.Collection, error)
- func (tc *Catalog) GetDatabases(ctx context.Context, getDatabase *model.GetDatabase, ts types.Timestamp) (*model.Database, error)
- func (tc *Catalog) GetSegments(ctx context.Context, segmentID types.UniqueID, segmentType *string, ...) ([]*model.Segment, error)
- func (tc *Catalog) GetSoftDeletedCollections(ctx context.Context, collectionID *string, tenantID string, ...) ([]*model.Collection, error)
- func (tc *Catalog) GetTenants(ctx context.Context, getTenant *model.GetTenant, ts types.Timestamp) (*model.Tenant, error)
- func (tc *Catalog) GetTenantsLastCompactionTime(ctx context.Context, tenantIDs []string) ([]*dbmodel.Tenant, error)
- func (tc *Catalog) ResetState(ctx context.Context) error
- func (tc *Catalog) SetTenantLastCompactionTime(ctx context.Context, tenantID string, lastCompactionTime int64) error
- func (tc *Catalog) UpdateCollection(ctx context.Context, updateCollection *model.UpdateCollection, ...) (*model.Collection, error)
- func (tc *Catalog) UpdateSegment(ctx context.Context, updateSegment *model.UpdateSegment, ts types.Timestamp) (*model.Segment, error)
- type Coordinator
- func (s *Coordinator) CheckCollection(ctx context.Context, collectionID types.UniqueID) (bool, error)
- func (s *Coordinator) CleanupSoftDeletedCollection(ctx context.Context, deleteCollection *model.DeleteCollection) error
- func (s *Coordinator) CreateCollection(ctx context.Context, createCollection *model.CreateCollection) (*model.Collection, bool, error)
- func (s *Coordinator) CreateCollectionAndSegments(ctx context.Context, createCollection *model.CreateCollection, ...) (*model.Collection, bool, error)
- func (s *Coordinator) CreateDatabase(ctx context.Context, createDatabase *model.CreateDatabase) (*model.Database, error)
- func (s *Coordinator) CreateSegment(ctx context.Context, segment *model.CreateSegment) error
- func (s *Coordinator) CreateTenant(ctx context.Context, createTenant *model.CreateTenant) (*model.Tenant, error)
- func (s *Coordinator) DeleteCollection(ctx context.Context, deleteCollection *model.DeleteCollection) error
- func (s *Coordinator) DeleteSegment(ctx context.Context, segmentID types.UniqueID, collectionID types.UniqueID) error
- func (s *Coordinator) FlushCollectionCompaction(ctx context.Context, ...) (*model.FlushCollectionInfo, error)
- func (s *Coordinator) GetCollections(ctx context.Context, collectionID types.UniqueID, collectionName *string, ...) ([]*model.Collection, error)
- func (s *Coordinator) GetDatabase(ctx context.Context, getDatabase *model.GetDatabase) (*model.Database, error)
- func (s *Coordinator) GetSegments(ctx context.Context, segmentID types.UniqueID, segmentType *string, ...) ([]*model.Segment, error)
- func (s *Coordinator) GetSoftDeletedCollections(ctx context.Context, collectionID *string, tenantID string, ...) ([]*model.Collection, error)
- func (s *Coordinator) GetTenant(ctx context.Context, getTenant *model.GetTenant) (*model.Tenant, error)
- func (s *Coordinator) GetTenantsLastCompactionTime(ctx context.Context, tenantIDs []string) ([]*dbmodel.Tenant, error)
- func (s *Coordinator) ResetState(ctx context.Context) error
- func (s *Coordinator) SetTenantLastCompactionTime(ctx context.Context, tenantID string, lastCompactionTime int64) error
- func (s *Coordinator) UpdateCollection(ctx context.Context, collection *model.UpdateCollection) (*model.Collection, error)
- func (s *Coordinator) UpdateSegment(ctx context.Context, updateSegment *model.UpdateSegment) (*model.Segment, error)
- type DeleteMode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Catalog ¶
type Catalog struct {
// contains filtered or unexported fields
}
The catalog backed by databases using GORM.
func NewTableCatalog ¶
func NewTableCatalog(txImpl dbmodel.ITransaction, metaDomain dbmodel.IMetaDomain) *Catalog
func (*Catalog) CheckCollection ¶
Returns true if collection is deleted (either soft-deleted or hard-deleted) and false otherwise.
func (*Catalog) CreateCollection ¶
func (*Catalog) CreateCollectionAndSegments ¶
func (tc *Catalog) CreateCollectionAndSegments(ctx context.Context, createCollection *model.CreateCollection, createSegments []*model.CreateSegment, ts types.Timestamp) (*model.Collection, bool, error)
func (*Catalog) CreateDatabase ¶
func (*Catalog) CreateSegment ¶
func (*Catalog) CreateTenant ¶
func (*Catalog) DeleteCollection ¶
func (*Catalog) DeleteSegment ¶
func (tc *Catalog) DeleteSegment(ctx context.Context, segmentID types.UniqueID, collectionID types.UniqueID) error
DeleteSegment is a no-op. Segments are deleted as part of atomic delete of collection. Keeping this API so that older clients continue to work.
func (*Catalog) FlushCollectionCompaction ¶
func (tc *Catalog) FlushCollectionCompaction(ctx context.Context, flushCollectionCompaction *model.FlushCollectionCompaction) (*model.FlushCollectionInfo, error)
func (*Catalog) GetAllDatabases ¶
func (*Catalog) GetAllTenants ¶
func (*Catalog) GetCollections ¶
func (*Catalog) GetDatabases ¶
func (*Catalog) GetSegments ¶
func (*Catalog) GetSoftDeletedCollections ¶
func (*Catalog) GetTenants ¶
func (*Catalog) GetTenantsLastCompactionTime ¶
func (*Catalog) SetTenantLastCompactionTime ¶
func (*Catalog) UpdateCollection ¶
func (tc *Catalog) UpdateCollection(ctx context.Context, updateCollection *model.UpdateCollection, ts types.Timestamp) (*model.Collection, error)
type Coordinator ¶
type Coordinator struct {
// contains filtered or unexported fields
}
Coordinator is the top level component. Currently, it only has the system catalog related APIs and will be extended to support other functionalities such as membership managed and propagation.
func NewCoordinator ¶
func NewCoordinator(ctx context.Context, db *gorm.DB, deleteMode DeleteMode) (*Coordinator, error)
func (*Coordinator) CheckCollection ¶
func (*Coordinator) CleanupSoftDeletedCollection ¶
func (s *Coordinator) CleanupSoftDeletedCollection(ctx context.Context, deleteCollection *model.DeleteCollection) error
func (*Coordinator) CreateCollection ¶
func (s *Coordinator) CreateCollection(ctx context.Context, createCollection *model.CreateCollection) (*model.Collection, bool, error)
func (*Coordinator) CreateCollectionAndSegments ¶
func (s *Coordinator) CreateCollectionAndSegments(ctx context.Context, createCollection *model.CreateCollection, createSegments []*model.CreateSegment) (*model.Collection, bool, error)
func (*Coordinator) CreateDatabase ¶
func (s *Coordinator) CreateDatabase(ctx context.Context, createDatabase *model.CreateDatabase) (*model.Database, error)
func (*Coordinator) CreateSegment ¶
func (s *Coordinator) CreateSegment(ctx context.Context, segment *model.CreateSegment) error
func (*Coordinator) CreateTenant ¶
func (s *Coordinator) CreateTenant(ctx context.Context, createTenant *model.CreateTenant) (*model.Tenant, error)
func (*Coordinator) DeleteCollection ¶
func (s *Coordinator) DeleteCollection(ctx context.Context, deleteCollection *model.DeleteCollection) error
func (*Coordinator) DeleteSegment ¶
func (s *Coordinator) DeleteSegment(ctx context.Context, segmentID types.UniqueID, collectionID types.UniqueID) error
DeleteSegment is a no-op. Segments are deleted as part of atomic delete of collection. Keeping this API so that older clients continue to work, since older clients will issue DeleteSegment after a DeleteCollection.
func (*Coordinator) FlushCollectionCompaction ¶
func (s *Coordinator) FlushCollectionCompaction(ctx context.Context, flushCollectionCompaction *model.FlushCollectionCompaction) (*model.FlushCollectionInfo, error)
func (*Coordinator) GetCollections ¶
func (*Coordinator) GetDatabase ¶
func (s *Coordinator) GetDatabase(ctx context.Context, getDatabase *model.GetDatabase) (*model.Database, error)
func (*Coordinator) GetSegments ¶
func (*Coordinator) GetSoftDeletedCollections ¶
func (s *Coordinator) GetSoftDeletedCollections(ctx context.Context, collectionID *string, tenantID string, databaseName string, limit int32) ([]*model.Collection, error)
func (*Coordinator) GetTenantsLastCompactionTime ¶
func (*Coordinator) ResetState ¶
func (s *Coordinator) ResetState(ctx context.Context) error
func (*Coordinator) SetTenantLastCompactionTime ¶
func (*Coordinator) UpdateCollection ¶
func (s *Coordinator) UpdateCollection(ctx context.Context, collection *model.UpdateCollection) (*model.Collection, error)
func (*Coordinator) UpdateSegment ¶
func (s *Coordinator) UpdateSegment(ctx context.Context, updateSegment *model.UpdateSegment) (*model.Segment, error)
type DeleteMode ¶
type DeleteMode int
DeleteMode represents whether to perform a soft or hard delete
const ( // SoftDelete marks records as deleted but keeps them in the database SoftDelete DeleteMode = iota // HardDelete permanently removes records from the database HardDelete )