buntdb

package
v0.24.0 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// DBFilePath specifies path to the DB file
	// if empty the in-mem version is used
	DBFilePath string
}

Config specifies configuration for logs meta storage based on BuntDB https://github.com/tidwall/buntdb

type Storage added in v0.5.0

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

Storage is the logs meta storage

func NewStorage added in v0.5.0

func NewStorage(cfg Config) *Storage

NewStorage creates new logs meta storage based on BuntDB

func (*Storage) CreateLog added in v0.5.0

func (s *Storage) CreateLog(ctx context.Context, log *solaris.Log) (*solaris.Log, error)

CreateLog implements storage.Logs

func (*Storage) DeleteLogs added in v0.5.0

func (s *Storage) DeleteLogs(ctx context.Context, req storage.DeleteLogsRequest) (*solaris.DeleteLogsResult, error)

DeleteLogs implements storage.Logs

func (*Storage) GetChunks added in v0.5.0

func (s *Storage) GetChunks(ctx context.Context, logID string) ([]logfs.ChunkInfo, error)

GetChunks implements logfs.LogsMetaStorage

func (*Storage) GetLastChunk added in v0.5.0

func (s *Storage) GetLastChunk(ctx context.Context, logID string) (logfs.ChunkInfo, error)

GetLastChunk implements logfs.LogsMetaStorage

func (*Storage) GetLogByID added in v0.5.0

func (s *Storage) GetLogByID(ctx context.Context, id string) (*solaris.Log, error)

GetLogByID implements storage.Logs

func (*Storage) Init added in v0.5.0

func (s *Storage) Init(ctx context.Context) error

Init implements linker.Initializer

func (*Storage) QueryLogs added in v0.5.0

func (s *Storage) QueryLogs(ctx context.Context, qr storage.QueryLogsRequest) (*solaris.QueryLogsResult, error)

QueryLogs implements storage.Logs

func (*Storage) Shutdown added in v0.5.0

func (s *Storage) Shutdown()

Shutdown implements linker.Shutdowner

func (*Storage) UpdateLog added in v0.5.0

func (s *Storage) UpdateLog(ctx context.Context, log *solaris.Log) (*solaris.Log, error)

UpdateLog implements storage.Logs

func (*Storage) UpsertChunkInfos added in v0.5.0

func (s *Storage) UpsertChunkInfos(ctx context.Context, logID string, cis []logfs.ChunkInfo) error

UpsertChunkInfos implements logfs.LogsMetaStorage

Jump to

Keyboard shortcuts

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