local

package
v0.0.0-...-bfa2730 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 18, 2024 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

Types

type Backend

type Backend struct {
	// contains filtered or unexported fields
}

func NewBackend

func NewBackend(cfg *Config) (*Backend, error)

func (*Backend) Append

func (rw *Backend) Append(ctx context.Context, name string, keypath backend.KeyPath, tracker backend.AppendTracker, buffer []byte) (backend.AppendTracker, error)

Append implements backend.Writer

func (*Backend) ClearBlock

func (rw *Backend) ClearBlock(blockID uuid.UUID, tenantID string) error

func (*Backend) CloseAppend

func (rw *Backend) CloseAppend(_ context.Context, tracker backend.AppendTracker) error

CloseAppend implements backend.Writer

func (*Backend) CompactedBlockMeta

func (rw *Backend) CompactedBlockMeta(blockID uuid.UUID, tenantID string) (*backend.CompactedBlockMeta, error)

func (*Backend) List

func (rw *Backend) List(_ context.Context, keypath backend.KeyPath) ([]string, error)

List implements backend.Reader

func (*Backend) MarkBlockCompacted

func (rw *Backend) MarkBlockCompacted(blockID uuid.UUID, tenantID string) error

func (*Backend) Read

func (rw *Backend) Read(_ context.Context, name string, keypath backend.KeyPath, _ bool) (io.ReadCloser, int64, error)

Read implements backend.Reader

func (*Backend) ReadRange

func (rw *Backend) ReadRange(ctx context.Context, name string, keypath backend.KeyPath, offset uint64, buffer []byte, _ bool) error

ReadRange implements backend.Reader

func (*Backend) Shutdown

func (rw *Backend) Shutdown()

Shutdown implements backend.Reader. It attempts to clear all tenants that do not have blocks.

func (*Backend) Write

func (rw *Backend) Write(_ context.Context, name string, keypath backend.KeyPath, data io.Reader, _ int64, _ bool) error

Write implements backend.Writer

type Config

type Config struct {
	Path string `yaml:"path"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL