asynqx

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewConsumerQueue

func NewConsumerQueue(redisClientOpt RedisClientOpt) (queuex.ConsumerQueue, error)

func NewConsumerQueueWithServer

func NewConsumerQueueWithServer(server *asynq.Server) (q queuex.ConsumerQueue, err error)

func NewProducerQueue

func NewProducerQueue(redisClientOpt RedisClientOpt) (queuex.ProducerQueue, error)

func NewProducerQueueWithClient

func NewProducerQueueWithClient(client *asynq.Client) (q queuex.ProducerQueue, err error)

Types

type RedisClientOpt

type RedisClientOpt struct {
	// Network type to use, either tcp or unix.
	// Default is tcp.
	Network string

	// Redis server address in "host:port" format.
	Addr string

	// Username to authenticate the current connection when Redis ACLs are used.
	// See: https://redis.io/commands/auth.
	Username string

	// Password to authenticate the current connection.
	// See: https://redis.io/commands/auth.
	Password string

	// Redis DB to select after connecting to a server.
	// See: https://redis.io/commands/select.
	DB int

	// Dial timeout for establishing new connections.
	// Default is 5 seconds.
	DialTimeout time.Duration

	// Timeout for socket reads.
	// If timeout is reached, read commands will fail with a timeout error
	// instead of blocking.
	//
	// Use value -1 for no timeout and 0 for default.
	// Default is 3 seconds.
	ReadTimeout time.Duration

	// Timeout for socket writes.
	// If timeout is reached, write commands will fail with a timeout error
	// instead of blocking.
	//
	// Use value -1 for no timeout and 0 for default.
	// Default is ReadTimout.
	WriteTimeout time.Duration

	// Maximum number of socket connections.
	// Default is 10 connections per every CPU as reported by runtime.NumCPU.
	PoolSize int
}

func (RedisClientOpt) ToAsyncQRedisClientOpt

func (opt RedisClientOpt) ToAsyncQRedisClientOpt() asynq.RedisClientOpt

Jump to

Keyboard shortcuts

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