buntdb

package
v0.14.0 Latest Latest
Warning

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

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

Documentation

Overview

Copyright 2024 The Solaris Authors

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

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