Documentation ¶
Index ¶
- type AsynqConf
- func (c *AsynqConf) NewClient() *asynq.Client
- func (c *AsynqConf) NewPeriodicTaskManager(provider asynq.PeriodicTaskConfigProvider) *asynq.PeriodicTaskManager
- func (c *AsynqConf) NewRedisOpt() *asynq.RedisClientOpt
- func (c *AsynqConf) NewScheduler() *asynq.Scheduler
- func (c *AsynqConf) NewServer() *asynq.Server
- func (c *AsynqConf) WithOriginalRedisConf(r config.RedisConf) *AsynqConf
- func (c *AsynqConf) WithRedisConf(r redis.RedisConf) *AsynqConf
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AsynqConf ¶
type AsynqConf struct { Addr string `json:",default=127.0.0.1:6379"` Username string `json:",optional"` Pass string `json:",optional"` DB int `json:",optional,default=0"` Concurrency int `json:",optional,default=20"` // max concurrent process job task num SyncInterval int `json:",optional,default=10"` // seconds, this field specifies how often sync should happen Enable bool `json:",default=true"` }
AsynqConf is the configuration struct for Asynq.
func (*AsynqConf) NewPeriodicTaskManager ¶
func (c *AsynqConf) NewPeriodicTaskManager(provider asynq.PeriodicTaskConfigProvider) *asynq.PeriodicTaskManager
NewPeriodicTaskManager returns a periodic task manager from the configuration.
func (*AsynqConf) NewRedisOpt ¶
func (c *AsynqConf) NewRedisOpt() *asynq.RedisClientOpt
NewRedisOpt returns a redis options from Asynq Configuration.
func (*AsynqConf) NewScheduler ¶
NewScheduler returns a scheduler from the configuration.
func (*AsynqConf) WithOriginalRedisConf ¶
WithOriginalRedisConf sets redis configuration from original RedisConf.
Click to show internal directories.
Click to hide internal directories.