worker

package
v0.0.0-...-dea60c0 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2024 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 Config

type Config struct {
	Name        string
	Retries     int
	Threadiness int
}

type ReconcileFunc

type ReconcileFunc func(key interface{}) error

type Worker

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

func New

func New(
	cfg *Config,
	l *zap.Logger,
	clock clock.WithTicker,
	reconcile ReconcileFunc,
) *Worker

func (*Worker) Enqueue

func (w *Worker) Enqueue(item interface{})

func (*Worker) EnqueueAfter

func (w *Worker) EnqueueAfter(item interface{}, duration time.Duration)

func (*Worker) Start

func (w *Worker) Start(interrupt <-chan struct{})

Jump to

Keyboard shortcuts

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