Documentation
¶
Index ¶
- Variables
- type IngestLog
- type LastCursor
- type LogPage
- type LogPageRequest
- type LogRange
- type LogService
- type PostgresLogService
- func (self *PostgresLogService) CommitLogs(ctx context.Context, logs []IngestLog) error
- func (self *PostgresLogService) GetInstances(ctx context.Context, projectId string, clientId string) ([]string, error)
- func (self *PostgresLogService) GetLogs(ctx context.Context, req LogPageRequest) (LogPage, error)
- func (self *PostgresLogService) SearchLogs(ctx context.Context, query string, projectId string, clientId string, ...) ([]types.StoredLog, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidLogClientID = errors.New("invalid log client id")
Functions ¶
This section is empty.
Types ¶
type LastCursor ¶
type LogPage ¶
type LogPage struct {
Logs []types.StoredLog
Instances *[]string
ForwardCursor *LastCursor
BackwardCursor *LastCursor
IsLastPage bool
Range *LogRange
}
type LogPageRequest ¶
type LogService ¶
type LogService interface {
GetLogs(ctx context.Context, req LogPageRequest) (LogPage, error)
GetInstances(ctx context.Context, projectId string, clientId string) ([]string, error)
SearchLogs(ctx context.Context, query string, projectId string, clientId string, instances *[]string, pageSize int64, lastCursor *LastCursor) ([]types.StoredLog, error)
}
type PostgresLogService ¶
type PostgresLogService struct {
// contains filtered or unexported fields
}
func NewLogService ¶
func NewLogService(pool *pgxpool.Pool, liveLogs *live.Logs) *PostgresLogService
func (*PostgresLogService) CommitLogs ¶
func (self *PostgresLogService) CommitLogs(ctx context.Context, logs []IngestLog) error
CommitLogs returns nil after inserting new events or recognizing an existing event key. Live delivery is best effort and must never turn a commit into a retry.
func (*PostgresLogService) GetInstances ¶
func (self *PostgresLogService) GetInstances(ctx context.Context, projectId string, clientId string) ([]string, error)
GetInstances implements LogRepository.
func (*PostgresLogService) GetLogs ¶
func (self *PostgresLogService) GetLogs(ctx context.Context, req LogPageRequest) (LogPage, error)
GetLogs implements LogRepository.
func (*PostgresLogService) SearchLogs ¶
Click to show internal directories.
Click to hide internal directories.