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 ¶
- type Config
- type Storage
- func (s *Storage) CreateLog(ctx context.Context, log *solaris.Log) (*solaris.Log, error)
- func (s *Storage) DeleteLogs(ctx context.Context, req storage.DeleteLogsRequest) (*solaris.DeleteLogsResult, error)
- func (s *Storage) GetChunks(ctx context.Context, logID string) ([]logfs.ChunkInfo, error)
- func (s *Storage) GetLastChunk(ctx context.Context, logID string) (logfs.ChunkInfo, error)
- func (s *Storage) GetLogByID(ctx context.Context, id string) (*solaris.Log, error)
- func (s *Storage) Init(ctx context.Context) error
- func (s *Storage) QueryLogs(ctx context.Context, qr storage.QueryLogsRequest) (*solaris.QueryLogsResult, error)
- func (s *Storage) Shutdown()
- func (s *Storage) UpdateLog(ctx context.Context, log *solaris.Log) (*solaris.Log, error)
- func (s *Storage) UpsertChunkInfos(ctx context.Context, logID string, cis []logfs.ChunkInfo) 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 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
NewStorage creates new logs meta storage based on BuntDB
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) GetLastChunk ¶ added in v0.5.0
GetLastChunk implements logfs.LogsMetaStorage
func (*Storage) GetLogByID ¶ added in v0.5.0
GetLogByID implements storage.Logs
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