cache

package
v0.28.0 Latest Latest
Warning

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

Go to latest
Published: May 8, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CachedStorage

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

CachedStorage wraps LogsChunksMetaStorage with caches for logs and chunks

func NewCachedStorage

func NewCachedStorage(storage LogsChunksMetaStorage) *CachedStorage

NewCachedStorage wraps LogsChunksMetaStorage into cache

func (*CachedStorage) CreateLog

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

CreateLog implements storage.Logs

func (*CachedStorage) DeleteLogs

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

DeleteLogs implements storage.Logs

func (*CachedStorage) GetChunks

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

GetChunks implements logfs.LogsMetaStorage

func (*CachedStorage) GetLastChunk

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

GetLastChunk implements logfs.LogsMetaStorage

func (*CachedStorage) GetLogByID

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

GetLogByID implements storage.Logs

func (*CachedStorage) Init

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

Init implements linker.Initializer

func (*CachedStorage) QueryLogs

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

QueryLogs implements storage.Logs

func (*CachedStorage) Shutdown

func (s *CachedStorage) Shutdown()

Shutdown implements linker.Shutdowner

func (*CachedStorage) UpdateLog

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

UpdateLog implements storage.Logs

func (*CachedStorage) UpsertChunkInfos

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

UpsertChunkInfos implements logfs.LogsMetaStorage

type LogsChunksMetaStorage

type LogsChunksMetaStorage interface {
	storage.Logs
	logfs.LogsMetaStorage
}

LogsChunksMetaStorage combines storage.Logs and logfs.LogsMetaStorage interfaces

Jump to

Keyboard shortcuts

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