faktory

package
v0.0.0-...-e6d59a1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFaktory

func NewFaktory(conf FaktoryConf) *faktoryClient

Types

type FaktoryClient

type FaktoryClient interface {
	service.Service

	Context() context.Context
	SetProcessor(jobNameProcessorMap map[string]JobProcessor)
	Push(job *faktory.Job) error
}

type FaktoryConf

type FaktoryConf struct {
	Url    string // tcp://:mypassword@faktory.example.com:7419
	Sender SenderConf
	Worker WorkerConf
}

docker exec -it faktory_container_name redis-cli -s /var/lib/faktory/db/redis.sock

type JobProcessor

type JobProcessor func(helper worker.Helper, args ...interface{}) error

type SenderConf

type SenderConf struct {
	PoolCapacity int `json:",default=1"`
}

type WorkerConf

type WorkerConf struct {
	Concurrency                int            `json:",default=20"`              // worker pool = concurrency + 2 github.com/contribsys/faktory_worker_go@v1.6.0/manager.go:137
	PullFromQueuesWithPriority map[string]int `json:",default={\"default\":1}"` // {"critical":3, "default":2, "bulk":1}
}

Jump to

Keyboard shortcuts

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