Documentation ¶
Index ¶
- type AppendBlock
- func (a *AppendBlock) BlockID() uuid.UUID
- func (a *AppendBlock) Clear() error
- func (a *AppendBlock) DataLength() uint64
- func (a *AppendBlock) Find(id common.ID, combiner common.ObjectCombiner) ([]byte, error)
- func (a *AppendBlock) GetIterator(combiner common.ObjectCombiner) (encoding.Iterator, error)
- func (a *AppendBlock) Meta() *backend.BlockMeta
- func (a *AppendBlock) Write(id common.ID, b []byte) error
- type Config
- type LocalBlock
- type WAL
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppendBlock ¶
type AppendBlock struct {
// contains filtered or unexported fields
}
AppendBlock is a block that is actively used to append new objects to. It stores all data in the appendFile in the order it was received and an in memory sorted index.
func (*AppendBlock) BlockID ¶ added in v0.7.0
func (a *AppendBlock) BlockID() uuid.UUID
func (*AppendBlock) Clear ¶
func (a *AppendBlock) Clear() error
func (*AppendBlock) DataLength ¶ added in v0.6.0
func (a *AppendBlock) DataLength() uint64
func (*AppendBlock) Find ¶
func (a *AppendBlock) Find(id common.ID, combiner common.ObjectCombiner) ([]byte, error)
func (*AppendBlock) GetIterator ¶ added in v0.7.0
func (a *AppendBlock) GetIterator(combiner common.ObjectCombiner) (encoding.Iterator, error)
func (*AppendBlock) Meta ¶ added in v0.7.0
func (a *AppendBlock) Meta() *backend.BlockMeta
type LocalBlock ¶ added in v0.7.0
type LocalBlock struct { encoding.BackendBlock // contains filtered or unexported fields }
LocalBlock is a block stored in a local storage. It can be searched and flushed to a remote backend, and permanently tracks the flushed time with a special file in the block
func NewLocalBlock ¶ added in v0.7.0
func NewLocalBlock(ctx context.Context, existingBlock *encoding.BackendBlock, l *local.Backend) (*LocalBlock, error)
func (*LocalBlock) FlushedTime ¶ added in v0.7.0
func (c *LocalBlock) FlushedTime() time.Time
FlushedTime returns the time the block was flushed. Will return 0
if the block was never flushed
func (*LocalBlock) SetFlushed ¶ added in v0.7.0
func (c *LocalBlock) SetFlushed(ctx context.Context) error
type WAL ¶
type WAL struct {
// contains filtered or unexported fields
}
func (*WAL) LocalBackend ¶ added in v0.7.0
func (*WAL) RescanBlocks ¶ added in v1.0.0
func (w *WAL) RescanBlocks(log log.Logger) ([]*AppendBlock, error)
RescanBlocks returns a slice of append blocks from the wal folder
Click to show internal directories.
Click to hide internal directories.