worker

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ErrorLogger

func ErrorLogger(err error)

ErrorLogger function defines a callback for handling errors

Types

type Worker

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

Worker struct

func NewWorker

func NewWorker(ctx context.Context, d time.Duration, fn func() error, eh func(err error)) *Worker

NewWorker creates a new Worker structure

func (*Worker) Run

func (w *Worker) Run()

Run starts the handling loop

Jump to

Keyboard shortcuts

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