Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AsynqLogLevel ¶
AsynqLogLevel converts level into an equivalent asynq.LogLevel.
func MergePeriodicTaskConfigProviders ¶
func MergePeriodicTaskConfigProviders(providers ...asynq.PeriodicTaskConfigProvider) asynq.PeriodicTaskConfigProvider
MergePeriodicTaskConfigProviders creates a new periodic task config provider backed by the specified list of providers.
Types ¶
type AsynqLogger ¶
type AsynqLogger struct {
// contains filtered or unexported fields
}
AsynqLogger is an implementation of asynq.Logger backed by a slog.Logger. This logger implements the Fatal method by cancelling a context.
func NewAsynqLogger ¶
func NewAsynqLogger(l *slog.Logger, log string) *AsynqLogger
NewAsynqLogger creates a new asynq.Logger instance backed by l. l will always add the "log" attribute with the specified value.
func (*AsynqLogger) Context ¶
func (l *AsynqLogger) Context() context.Context
Context returns the context of l. If l.Fatal has been called, the context will be cancelled.
func (*AsynqLogger) Debug ¶
func (l *AsynqLogger) Debug(args ...any)
Debug logs a message at Debug level.
func (*AsynqLogger) Error ¶
func (l *AsynqLogger) Error(args ...any)
Error logs a message at Error level.
func (*AsynqLogger) Fatal ¶
func (l *AsynqLogger) Fatal(args ...any)
Fatal logs a message at Error level. Additionally Fatal cancels the context of l, leading to the program's termination.
func (*AsynqLogger) Info ¶
func (l *AsynqLogger) Info(args ...any)
Info logs a message at Info level.
func (*AsynqLogger) Warn ¶
func (l *AsynqLogger) Warn(args ...any)
Warn logs a message at Warning level.