Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type VersionedEncoding ¶
type VersionedEncoding interface {
Version() string
// OpenBlock for reading
OpenBlock(meta *backend.BlockMeta, r backend.Reader) (common.BackendBlock, error)
// NewCompactor creates a Compactor that can be used to combine blocks of this
// encoding. It is expected to use internal details for efficiency.
NewCompactor(common.CompactionOptions) common.Compactor
// CreateBlock with the given attributes and snapshot contents.
// BlockMeta is used as a container for many options. Required fields:
// * BlockID
// * TenantID
// * Encoding
// * DataEncoding
// * StartTime
// * EndTime
// * TotalObjects
CreateBlock(ctx context.Context, cfg *common.BlockConfig, meta *backend.BlockMeta, i common.Iterator, r backend.Reader, to backend.Writer) (*backend.BlockMeta, error)
// CopyBlock from one backend to another.
CopyBlock(ctx context.Context, meta *backend.BlockMeta, from backend.Reader, to backend.Writer) error
// MigrateBlock from one backend and tenant to another.
MigrateBlock(ctx context.Context, fromMeta, toMeta *backend.BlockMeta, from backend.Reader, to backend.Writer) error
// OpenWALBlock opens an existing appendable block for the WAL
OpenWALBlock(filename string, path string, ingestionSlack time.Duration, additionalStartSlack time.Duration) (common.WALBlock, error, error)
// CreateWALBlock creates a new appendable block for the WAL
CreateWALBlock(id uuid.UUID, tenantID string, filepath string, e backend.Encoding, dataEncoding string, ingestionSlack time.Duration) (common.WALBlock, error)
// OwnsWALBlock indicates if this encoding owns the WAL block
OwnsWALBlock(entry fs.DirEntry) bool
}
VersionedEncoding represents a backend block version, and the methods to read/write them.
func DefaultEncoding ¶
func DefaultEncoding() VersionedEncoding
DefaultEncoding for newly written blocks.
func FromVersion ¶
func FromVersion(v string) (VersionedEncoding, error)
FromVersion returns a versioned encoding for the provided string
Click to show internal directories.
Click to hide internal directories.