job

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Job

type Job interface {
	Run(context.Context) error
}

type Manager

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

func NewManager

func NewManager(r metrics.Registerer, subsystem string, logger *zap.Logger) *Manager

func (*Manager) AddCronJob

func (m *Manager) AddCronJob(name, cron string, job Job) error

func (*Manager) Run

func (m *Manager) Run() error

func (*Manager) Stop

func (m *Manager) Stop()

type Option

type Option func(*options)

func WithLogger

func WithLogger(l *zap.Logger) Option

func WithMetrics

func WithMetrics(r metrics.Registerer) Option

func WithTimeout

func WithTimeout(timeout time.Duration) Option

Jump to

Keyboard shortcuts

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