buntdb

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2024 License: Apache-2.0 Imports: 13 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 LogStorage

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

LogStorage is the logs meta storage, implements the storage.Logs interface

func NewLogStorage

func NewLogStorage(cfg Config) *LogStorage

NewLogStorage creates new logs meta storage based on BuntDB

func (*LogStorage) CreateLog

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

CreateLog implements storage.Logs

func (*LogStorage) DeleteLogs

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

DeleteLogs implements storage.Logs

func (*LogStorage) GetLogByID

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

GetLogByID implements storage.Logs

func (*LogStorage) Init

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

Init implements linker.Initializer

func (*LogStorage) QueryLogs

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

QueryLogs implements storage.Logs

func (*LogStorage) Shutdown

func (s *LogStorage) Shutdown()

Shutdown implements linker.Shutdowner

func (*LogStorage) UpdateLog

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

UpdateLog implements storage.Logs

Jump to

Keyboard shortcuts

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