asynq

package
v1.3.12 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

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) NewClient

func (c *AsynqConf) NewClient() *asynq.Client

NewClient returns a client from the configuration.

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

func (c *AsynqConf) NewScheduler() *asynq.Scheduler

NewScheduler returns a scheduler from the configuration.

func (*AsynqConf) NewServer

func (c *AsynqConf) NewServer() *asynq.Server

NewServer returns a worker from the configuration.

func (*AsynqConf) WithOriginalRedisConf

func (c *AsynqConf) WithOriginalRedisConf(r config.RedisConf) *AsynqConf

WithOriginalRedisConf sets redis configuration from original RedisConf.

func (*AsynqConf) WithRedisConf

func (c *AsynqConf) WithRedisConf(r redis.RedisConf) *AsynqConf

WithRedisConf sets redis configuration from RedisConf.

Jump to

Keyboard shortcuts

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