redis

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2023 License: AGPL-3.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrInvalidAddr indicates that the provided address is not a valid redis connection string
	ErrInvalidAddr = errors.New("invalid connecton string: see documentation for valid connection strings")
)

Functions

func Backend

func Backend(ctx context.Context, opts ...config.Option) (backend types.Backend, err error)

Backend is a config.BackendInitializer that initializes a new Redis-backed neoq backend

func WithAddr

func WithAddr(addr string) config.Option

WithAddr configures neoq to connect to Redis with the given address

func WithConcurrency

func WithConcurrency(concurrency int) config.Option

WithConcurrency configures the number of workers available to process jobs across all queues

func WithPassword

func WithPassword(password string) config.Option

WithPassword configures neoq to connect to Redis with the given password

func WithShutdownTimeout

func WithShutdownTimeout(timeout time.Duration) config.Option

WithShutdownTimeout specifies the duration to wait to let workers finish their tasks before forcing them to abort durning Shutdown()

If unset or zero, default timeout of 8 seconds is used.

Types

type MemoryTaskConfigProvider

type MemoryTaskConfigProvider struct {
	// contains filtered or unexported fields
}

func NewMemoryTaskConfigProvider

func NewMemoryTaskConfigProvider() (p *MemoryTaskConfigProvider)

NewMemoryTaskConfigProvider returns a new asynq MemoryTaskConfigProvider

func (*MemoryTaskConfigProvider) GetConfigs

func (m *MemoryTaskConfigProvider) GetConfigs() (c []*asynq.PeriodicTaskConfig, err error)

GetConfigs returns this provider's periodic task configurations

Jump to

Keyboard shortcuts

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