subscriber

package
v1.19.0 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2024 License: MIT Imports: 2 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Errors added in v1.10.0

type Errors map[string]error

Errors for observers.

func (Errors) Error added in v1.10.0

func (e Errors) Error() error

Error the first error from map.

func (Errors) Errors added in v1.10.0

func (e Errors) Errors() Errors

Errors is a copy.

func (Errors) Set added in v1.10.0

func (e Errors) Set(name string, err error)

Set the error at the name.

type Observer

type Observer struct {
	// contains filtered or unexported fields
}

Observer represents a subscriber that mantaines state about probes.

func NewObserver

func NewObserver(names []string, sub *Subscriber) *Observer

NewObserver from probe names and subscriber.

func (*Observer) Error

func (o *Observer) Error() error

Error is the first error observed.

func (*Observer) Errors added in v1.10.0

func (o *Observer) Errors() Errors

Error are a copy of rhe errors.

type Subscriber

type Subscriber struct {
	// contains filtered or unexported fields
}

Subscriber subscribes to multiple probes.

func NewSubscriber

func NewSubscriber(names []string) *Subscriber

NewSubscriber for multiple probes.

func (*Subscriber) Receive

func (s *Subscriber) Receive() <-chan *probe.Tick

Receive from the subscriber.

func (*Subscriber) Send

func (s *Subscriber) Send(tick *probe.Tick)

Send tick to subscriber.

Jump to

Keyboard shortcuts

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