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 CachedStorage
- func (s *CachedStorage) CreateLog(ctx context.Context, log *solaris.Log) (*solaris.Log, error)
- func (s *CachedStorage) DeleteLogs(ctx context.Context, request storage.DeleteLogsRequest) (*solaris.DeleteLogsResult, error)
- func (s *CachedStorage) GetChunks(ctx context.Context, logID string) ([]logfs.ChunkInfo, error)
- func (s *CachedStorage) GetLastChunk(ctx context.Context, logID string) (logfs.ChunkInfo, error)
- func (s *CachedStorage) GetLogByID(ctx context.Context, id string) (*solaris.Log, error)
- func (s *CachedStorage) Init(ctx context.Context) error
- func (s *CachedStorage) QueryLogs(ctx context.Context, qr storage.QueryLogsRequest) (*solaris.QueryLogsResult, error)
- func (s *CachedStorage) Shutdown()
- func (s *CachedStorage) UpdateLog(ctx context.Context, log *solaris.Log) (*solaris.Log, error)
- func (s *CachedStorage) UpsertChunkInfos(ctx context.Context, logID string, cis []logfs.ChunkInfo) error
- type LogsChunksMetaStorage
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) GetLastChunk ¶
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