workers

package
v1.7.1 Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2024 License: UPL-1.0 Imports: 0 Imported by: 0

Documentation

Overview

Package workers contains a set of workers that implement PSR use cases.

# Worker Each worker does a single task, such as generate logs. The Worker.Work function is called repeatedly by the workmanager.Runner, which implements the loop. If the worker has a dependency that doesn't exist, like OpenSearch, it should return an error.

## Immutable Each worker should use a value receiver so that the worker is immutable. Any mutable state should be keep in a struct or structs pointed to by the worker. For example, see runner.go *runnerMetrics in the runner struct.

# Metrics Each worker can and should generate metrics. The metrics much be thread safe since the collection will be done from a go routine, see workmanager/runner.go for an example. The metrics collection is generically handled by the metrics/collector.go code.

Directories

Path Synopsis
Package example has an example worker is used as the default worker when the helm chart is run without specifying a worker override file.
Package example has an example worker is used as the default worker when the helm chart is run without specifying a worker override file.
http
get
opensearch
prometheus
weblogic

Jump to

Keyboard shortcuts

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