jobs

package
v0.0.0-...-fd49e9c Latest Latest
Warning

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

Go to latest
Published: Apr 25, 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 WithAddress

func WithAddress(address string) ComponentOption

WithAddress sets the redis address for the JobsEnqueuer 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 WithPoolSize

func WithPoolSize(poolSize int) ComponentOption

WithPoolSize sets the pool size for the JobsEnqueuer component.

Jump to

Keyboard shortcuts

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