worker

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2025 License: MPL-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type WorkerAPI

type WorkerAPI interface {
	// Start must put the service in execution. It can block and wait for some
	// signal to finish, which should be done in the Stop call. If it needs
	// a loop, i.e., execute forever, it must be done at the service level.
	// One way to do it is to use ctx.Done() to check if the loop needs to
	// finish.
	Start(ctx context.Context) error

	// Stop should end the Run execution.
	Stop(ctx context.Context) error
}

WorkerAPI corresponds to the API that a worker service must implement in its main structure.

Jump to

Keyboard shortcuts

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