Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AsynqLogLevel ¶
AsynqLogLevel converts level into an equivalent asynq.LogLevel.
Types ¶
type AsynqLogger ¶
type AsynqLogger struct { Logger *slog.Logger // underlying logger Sig chan<- os.Signal // termination signal }
AsynqLogger is an implementation of asynq.Logger backed by a slog.Logger. This logger implements the Fatal method by sending a termination signal.
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 sends a SIGINT to the current process, 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.
type Config ¶
type Config struct { Debug bool `mapstructure:"debug"` Log struct { Level slog.Level `mapstructure:"level"` Format string `mapstructure:"format"` } `mapstructure:"log"` DBConnection string `mapstructure:"db-url"` RedisConnection string `mapstructure:"redis-url"` API struct { Address string `mapstructure:"address"` } `mapstructure:"api"` TaskRunner struct { Workers int `mapstructure:"workers"` } `mapstructure:"task-server"` Uploads struct { Dir string `mapstructure:"dir"` } `mapstructure:"uploads"` Media struct { Dir string `mapstructure:"dir"` } `mapstructure:"media"` Jobs map[string]JobConfig `mapstructure:"jobs"` }
Click to show internal directories.
Click to hide internal directories.