Documentation
¶
Index ¶
- type Config
- type LogStorage
- func (s *LogStorage) CreateLog(ctx context.Context, log *solaris.Log) (*solaris.Log, error)
- func (s *LogStorage) DeleteLogs(ctx context.Context, req storage.DeleteLogsRequest) (*solaris.CountResult, error)
- func (s *LogStorage) GetLogByID(ctx context.Context, id string) (*solaris.Log, error)
- func (s *LogStorage) Init(ctx context.Context) error
- func (s *LogStorage) QueryLogs(ctx context.Context, qr storage.QueryLogsRequest) (*solaris.QueryLogsResult, error)
- func (s *LogStorage) Shutdown()
- func (s *LogStorage) UpdateLog(ctx context.Context, log *solaris.Log) (*solaris.Log, error)
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
Click to show internal directories.
Click to hide internal directories.