util

package
v1.0.0-rc.0 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2021 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompactedMetaFileName

func CompactedMetaFileName(blockID uuid.UUID, tenantID string) string

func FileExists

func FileExists(filename string) error

func MetaFileName

func MetaFileName(blockID uuid.UUID, tenantID string) string

func ObjectFileName

func ObjectFileName(blockID uuid.UUID, tenantID string, name string) string

func RootPath added in v0.3.0

func RootPath(blockID uuid.UUID, tenantID string) string

nolint:interfacer

Types

type MockReader added in v0.5.0

type MockReader struct {
	T      []string
	B      []uuid.UUID        // blocks
	M      *backend.BlockMeta // meta
	R      []byte             // read
	Range  []byte             // ReadRange
	ReadFn func(name string, blockID uuid.UUID, tenantID string) ([]byte, error)
}

func (*MockReader) BlockMeta added in v0.5.0

func (m *MockReader) BlockMeta(ctx context.Context, blockID uuid.UUID, tenantID string) (*backend.BlockMeta, error)

func (*MockReader) Blocks added in v0.5.0

func (m *MockReader) Blocks(ctx context.Context, tenantID string) ([]uuid.UUID, error)

func (*MockReader) Read added in v0.5.0

func (m *MockReader) Read(ctx context.Context, name string, blockID uuid.UUID, tenantID string) ([]byte, error)

func (*MockReader) ReadRange added in v0.5.0

func (m *MockReader) ReadRange(ctx context.Context, name string, blockID uuid.UUID, tenantID string, offset uint64, buffer []byte) error

func (*MockReader) ReadReader added in v0.7.0

func (m *MockReader) ReadReader(ctx context.Context, name string, blockID uuid.UUID, tenantID string) (io.ReadCloser, int64, error)

func (*MockReader) Shutdown added in v0.5.0

func (m *MockReader) Shutdown()

func (*MockReader) Tenants added in v0.5.0

func (m *MockReader) Tenants(ctx context.Context) ([]string, error)

type MockWriter added in v0.5.0

type MockWriter struct {
}

func (*MockWriter) Append added in v0.5.0

func (m *MockWriter) Append(ctx context.Context, name string, blockID uuid.UUID, tenantID string, tracker backend.AppendTracker, buffer []byte) (backend.AppendTracker, error)

func (*MockWriter) CloseAppend added in v0.5.0

func (m *MockWriter) CloseAppend(ctx context.Context, tracker backend.AppendTracker) error

func (*MockWriter) Write added in v0.5.0

func (m *MockWriter) Write(ctx context.Context, name string, blockID uuid.UUID, tenantID string, buffer []byte) error

func (*MockWriter) WriteBlockMeta added in v0.5.0

func (m *MockWriter) WriteBlockMeta(ctx context.Context, meta *backend.BlockMeta) error

func (*MockWriter) WriteReader added in v0.5.0

func (m *MockWriter) WriteReader(ctx context.Context, name string, blockID uuid.UUID, tenantID string, data io.Reader, size int64) error

Jump to

Keyboard shortcuts

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