jobs

package
v0.0.0-...-9154808 Latest Latest
Warning

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

Go to latest
Published: May 22, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultPoolSize  = 5
	DefaultNamespace = "__foundation_jobs__"
)
View Source
const (
	ComponentName = "jobs-enqueuer"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Component

type Component struct {
	Enqueuer *work.Enqueuer
	// contains filtered or unexported fields
}

func NewComponent

func NewComponent(opts ...ComponentOption) *Component

func (*Component) Health

func (c *Component) Health() error

Health implements the Component interface.

func (*Component) Name

func (c *Component) Name() string

Name implements the Component interface.

func (*Component) Start

func (c *Component) Start() error

Start implements the Component interface.

func (*Component) Stop

func (c *Component) Stop() error

Stop implements the Component interface.

type ComponentOption

type ComponentOption func(*Component)

ComponentOption is an option to `Component`.

func WithLogger

func WithLogger(logger *logrus.Entry) ComponentOption

WithLogger sets the logger for the JobsEnqueuer component

func WithNamespace

func WithNamespace(namespace string) ComponentOption

WithNamespace sets the namespace for JobsEnqueuer component.

func WithRedisPool

func WithRedisPool(redisPool *redis.Pool) ComponentOption

WithRedisPool sets the redis pool for JobsEnqueuer component.

Jump to

Keyboard shortcuts

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