Documentation
¶
Overview ¶
Package tasklog implements ppacer Task loggers.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Factory ¶
Factory represents an object which can create loggers and log readers for given DAG run tasks. Usually there should be at least one implementation of this interface for supported by ppacer persistence layer (like SQLite, PostgreSQL, etc).
type Reader ¶
type Reader interface { ReadAll(context.Context) ([]Record, error) ReadLatest(context.Context, int) ([]Record, error) }
Reader represents a reader for single dag.Task log records. TODO(dskrzypiec): this interface will be revised after frontend implementation for fetching task logs.
type Record ¶
Record represents single dag.Task log record. It doesn't contain information about DAG run task, because Reader is instantiated for given TaskInfo.
type SQLite ¶
type SQLite struct {
// contains filtered or unexported fields
}
SQLite implements Factory using SQLite database as a target for task logs.
func NewSQLite ¶
func NewSQLite(dbClient *db.LogsClient, loggerOpts *slog.HandlerOptions) *SQLite
NewSQLite instantiate new SQLite object. Given database client should be setup to use SQLite. Optionally provided loggerOpts would be used in the logger for task logs.
func (*SQLite) GetLogReader ¶
GetLogReader returns an instance of Reader for reading log records related to given DAG run task.