Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Batch ¶
type Batch struct {
// contains filtered or unexported fields
}
Batch is used to perform multiple object additions/deletions at once.
func (*Batch) AddObject ¶
func (b *Batch) AddObject(meta SharedObjectMetadata)
AddObject adds a new object to the batch.
The given FileNum must be new - it must not match that of any object that was ever in the catalog.
func (*Batch) DeleteObject ¶
DeleteObject adds an object removal to the batch.
type Catalog ¶
type Catalog struct {
// contains filtered or unexported fields
}
Catalog is used to manage the on-disk shared object catalog.
The catalog file is a log of records, where each record is an encoded versionEdit.
func (*Catalog) ApplyBatch ¶
ApplyBatch applies a batch of updates; returns after the change is stably recorded on storage.
func (*Catalog) SetCreatorID ¶
SetCreatorID sets the creator ID. If it is already set, it must match.
type CatalogContents ¶
type CatalogContents struct {
// CreatorID, if it is set.
CreatorID CreatorID
Objects []SharedObjectMetadata
}
CatalogContents contains the shared objects in the catalog.
type CreatorID ¶
type CreatorID uint64
CreatorID identifies the DB instance that originally created a shared object. This ID is incorporated in backing object names. Must be non-zero.
type SharedObjectMetadata ¶
type SharedObjectMetadata struct {
// instance.
FileNum base.FileNum
FileType base.FileType
CreatorID CreatorID
// DB instance that originally created the object.
CreatorFileNum base.FileNum
}
SharedObjectMetadata encapsulates the data stored in the catalog file for each object.