Documentation ¶
Index ¶
Constants ¶
View Source
const ( QueueCritical = "critical" QueueDefault = "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) DistributeTaskSendVerifyEmail ¶
func (p *RedisTaskDistributor) DistributeTaskSendVerifyEmail( ctx context.Context, payload *PayloadSendVerifyEmail, opts ...asynq.Option, ) error
type RedisTaskProcessor ¶
type RedisTaskProcessor struct {
// contains filtered or unexported fields
}
func (*RedisTaskProcessor) ProcessTaskSendVerifyEmail ¶
func (*RedisTaskProcessor) Start ¶
func (r *RedisTaskProcessor) Start() error
type TaskDistributor ¶
type TaskDistributor interface { DistributeTaskSendVerifyEmail( ctx context.Context, payload *PayloadSendVerifyEmail, opts ...asynq.Option, ) error }
func NewRedisTaskDistributor ¶
func NewRedisTaskDistributor(redisOpt asynq.RedisClientOpt) TaskDistributor
type TaskProcessor ¶
type TaskProcessor interface { Start() error ProcessTaskSendVerifyEmail(ctx context.Context, task *asynq.Task) error }
func NewRedisTaskProcessor ¶
func NewRedisTaskProcessor(redisOpt asynq.RedisClientOpt, store db.Store, mailer mail.EmailSender) TaskProcessor
Source Files ¶
Click to show internal directories.
Click to hide internal directories.