worker

package
v0.0.0-...-e45acd6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 15, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	QueueCritical = "critical"
	DefaultQueue  = "default"
)
View Source
const TaskSendVerifyEmail = "task:send_verify_email"

Variables

This section is empty.

Functions

This section is empty.

Types

type PayloadSendVerifyEmail

type PayloadSendVerifyEmail struct {
	Username string `json:"username"`
}

type RedisTaskDistributor

type RedisTaskDistributor struct {
	// contains filtered or unexported fields
}

func (*RedisTaskDistributor) SendVerifyEmail

func (distributor *RedisTaskDistributor) SendVerifyEmail(ctx context.Context, payload *PayloadSendVerifyEmail, opts ...asynq.Option) error

type RedisTaskProcessor

type RedisTaskProcessor struct {
	// contains filtered or unexported fields
}

func (*RedisTaskProcessor) ProcessVerifyEmail

func (processor *RedisTaskProcessor) ProcessVerifyEmail(ctx context.Context, task *asynq.Task) error

func (*RedisTaskProcessor) Start

func (processor *RedisTaskProcessor) Start() error

type TaskDistributor

type TaskDistributor interface {
	SendVerifyEmail(ctx context.Context, payload *PayloadSendVerifyEmail, opts ...asynq.Option) error
}

func NewRedisTaskDistributor

func NewRedisTaskDistributor(redisOpt asynq.RedisClientOpt) TaskDistributor

type TaskProcessor

type TaskProcessor interface {
	Start() error
	ProcessVerifyEmail(ctx context.Context, task *asynq.Task) error
}

func NewRedisTaskProcessor

func NewRedisTaskProcessor(redisOpt asynq.RedisClientOpt, store db.Store) TaskProcessor

Directories

Path Synopsis
Package mockwk is a generated GoMock package.
Package mockwk is a generated GoMock package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL