Documentation
¶
Index ¶
- Constants
- type Logger
- func (logger *Logger) Debug(args ...interface{})
- func (logger *Logger) Error(args ...interface{})
- func (logger *Logger) Fatal(args ...interface{})
- func (logger *Logger) Info(args ...interface{})
- func (logger *Logger) Print(level zerolog.Level, args ...interface{})
- func (logger *Logger) Warn(args ...interface{})
- type PayloadSendVerifyEmail
- type RedisTaskDistributor
- type RedisTaskProcessor
- type TaskDistributor
- type TaskProcessor
Constants ¶
View Source
const ( QueueCritical = "critical" QueueDefault = "default" )
View Source
const TaskSendVerifyEmail = "TaskSendVerifyEmail"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Logger ¶
type Logger struct {
}
Logger Made this so that the redis logs look the same as the rest of the api (using zero log)
func (*Logger) Debug ¶
func (logger *Logger) Debug(args ...interface{})
Debug logs a message at Debug level.
func (*Logger) Error ¶
func (logger *Logger) Error(args ...interface{})
Error logs a message at Error level.
func (*Logger) Fatal ¶
func (logger *Logger) Fatal(args ...interface{})
Fatal logs a message at Fatal level and process will exit with status set to 1.
type PayloadSendVerifyEmail ¶
type PayloadSendVerifyEmail struct {
Username string `json:"username"`
}
type RedisTaskDistributor ¶
type RedisTaskDistributor struct {
// contains filtered or unexported fields
}
func (*RedisTaskDistributor) DistributeTaskSendVerifyEmail ¶
func (distributor *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 (processor *RedisTaskProcessor) Start() error
type TaskDistributor ¶
type TaskDistributor interface {
DistributeTaskSendVerifyEmail(
ctx context.Context,
payload *PayloadSendVerifyEmail,
option ...asynq.Option) error
}
func NewRedisTaskDistributor ¶
func NewRedisTaskDistributor(redisOpt asynq.RedisClientOpt) TaskDistributor
NewRedisTaskDistributor we return a new redis task distributor interface to force the RedisTaskDistributor to implement it
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
Click to show internal directories.
Click to hide internal directories.