Documentation
¶
Index ¶
- Constants
- func MapError(err error) error
- func MapPqError(err error) error
- type Chunk
- type Db
- type DbConfig
- type DbContainer
- type DbOption
- type Log
- 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) QueryLogs(ctx context.Context, qr storage.QueryLogsRequest) (*solaris.QueryLogsResult, error)
- 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
- type Tags
Constants ¶
View Source
const ( PqForeignKeyViolationError = pq.ErrorCode("23503") PqUniqueViolationError = pq.ErrorCode("23505") )
Variables ¶
This section is empty.
Functions ¶
func MapPqError ¶
Types ¶
type Db ¶
Db exposes db operations
type DbConfig ¶
type DbConfig struct { Host string Port string User string Password string DbName string SslMode string }
func (DbConfig) DataSourceFull ¶
func (DbConfig) DataSourceNoDb ¶
type DbContainer ¶
func NewNilDbContainer ¶
func NewNilDbContainer(opts ...DbOption) (DbContainer, error)
func NewPgDbContainer ¶
NewPgDbContainer runs pg database in a docker container.
type DbOption ¶
type DbOption func(cfg *DbConfig)
func WithDbName ¶
func WithPassword ¶
func WithSslMode ¶
type Storage ¶
type Storage struct {
// contains filtered or unexported fields
}
Storage is the logs meta storage
func NewStorage ¶
NewStorage creates new logs meta storage based on Postgres
func (*Storage) DeleteLogs ¶
func (s *Storage) DeleteLogs(ctx context.Context, req storage.DeleteLogsRequest) (*solaris.DeleteLogsResult, error)
DeleteLogs implements storage.Logs
func (*Storage) GetLastChunk ¶
GetLastChunk implements logfs.LogsMetaStorage
func (*Storage) GetLogByID ¶
GetLogByID implements storage.Logs
func (*Storage) QueryLogs ¶
func (s *Storage) QueryLogs(ctx context.Context, qr storage.QueryLogsRequest) (*solaris.QueryLogsResult, error)
QueryLogs implements storage.Logs
Click to show internal directories.
Click to hide internal directories.