helpers

package
v4.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PollSensors

func PollSensors(ctx context.Context, updater func(), interval, stdev time.Duration)

PollSensors is a helper function that will call the passed `updater()` function around each `interval` duration within the `stdev` duration window. Effectively, `updater()` will get called sometime near `interval`, but not exactly on it. This can help avoid a "thundering herd" problem of sensors all trying to update at the same time.

Types

This section is empty.

Jump to

Keyboard shortcuts

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