asynq

package
v0.0.0-...-a35a875 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2023 License: MPL-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunServer

func RunServer(config AsynqServerConfig, handlers ...AsynqTaskHandler)

Types

type AsynqClient

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

func GetDefaultTaskClient

func GetDefaultTaskClient() *AsynqClient

func (*AsynqClient) EnqueueTask

func (ac *AsynqClient) EnqueueTask(name string, payload interface{}) error

type AsynqServerConfig

type AsynqServerConfig struct {
	Concurrency int
	UsePriority bool
}

type AsynqTaskHandler

type AsynqTaskHandler struct {
	TaskName     string
	InnerHandler asynq.HandlerFunc
}

type AsynqTaskPriority

type AsynqTaskPriority string
const (
	AsynqTaskPriorityCritical AsynqTaskPriority = "critical"
	// Default priority ruled in asynq library
	AsynqTaskPriorityDefault AsynqTaskPriority = "default"
	AsynqTaskPriorityLow     AsynqTaskPriority = "low"
)

Jump to

Keyboard shortcuts

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