package
Version:
v1.0.0
Opens a new window with list of versions in this module.
Published: May 29, 2024
License: MIT
Opens a new window with license information.
Imports: 4
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
type Worker[T any] struct {
}
Worker applies generics to the Worker struct, making it type-specific.
New is now a generic function that returns an instance of a type-specific Worker.
Start accepts a WorkerFn that is specific to the type T.
Stop provides functionality to stop the worker's operations.
type WorkerFn[T any] func(descriptor T) error
WorkerFn defines WorkerFn as a generic type with a type parameter T.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.