Documentation ¶
Index ¶
- Constants
- Variables
- func AsynqConfig(cfg Config, log *zap.Logger) asynq.Config
- func DecodeTask(task *asynq.Task, out any) error
- func IsDuplicateTaskErr(err error) bool
- func NewAsynqScheduler(redisOpt asynq.RedisClientOpt, log *zap.Logger) *asynq.Scheduler
- func NewServeMux(meterProvider *sdkmetric.MeterProvider, ...) *asynq.ServeMux
- func NewTask(typename string, payload any, opts ...asynq.Option) (*asynq.Task, error)
- func RegisterScheduledTasks(sch *asynq.Scheduler, tasks ...SchedulerFunc) error
- type Config
- type Queue
- type SchedulerFunc
Constants ¶
View Source
const MeterName = "github.com/ianunruh/go-backend-app/internal/work"
View Source
const TracerName = "github.com/ianunruh/go-backend-app/internal/work"
Variables ¶
Functions ¶
func IsDuplicateTaskErr ¶
func NewAsynqScheduler ¶
func NewServeMux ¶
func NewServeMux( meterProvider *sdkmetric.MeterProvider, tracerProvider *sdktrace.TracerProvider, log *zap.Logger, ) *asynq.ServeMux
func RegisterScheduledTasks ¶
func RegisterScheduledTasks(sch *asynq.Scheduler, tasks ...SchedulerFunc) error
Types ¶
type Queue ¶
type Queue interface { Enqueue(ctx context.Context, task *asynq.Task, opts ...asynq.Option) (*asynq.TaskInfo, error) Close() error }
func NewQueue ¶
func NewQueue(r asynq.RedisConnOpt, meterProvider *sdkmetric.MeterProvider, tracerProvider *sdktrace.TracerProvider, log *zap.Logger) Queue
type SchedulerFunc ¶
Click to show internal directories.
Click to hide internal directories.