Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IntervalObserver ¶
IntervalObserver defines a generic structure that observes a value at a fixed interval and executes a function on it. The observation continues until a stop signal is received from a shared channel or an error occurs in the function.
func (*IntervalObserver[T]) Observe ¶
func (o *IntervalObserver[T]) Observe(stop <-chan any) error
Observe starts observing the Observable at regular intervals, executing the specified function until stopped or an error occurs. The observation loop terminates when the stop channel receives a signal or the function returns an error.
Click to show internal directories.
Click to hide internal directories.