async

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 22, 2023 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Worker

type Worker interface {
	Start() // Start the worker (must be called in a goroutine)
	Stop()  // Wait for the current worker job to finish and returns
}

func NewIntervalWorker

func NewIntervalWorker(logger log.Logger, interval time.Duration, fn func(context.Context) error) Worker

Builds a new worker which will call the given function at the given minimum rate.

Jump to

Keyboard shortcuts

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