observatory

package
v0.0.0-...-b933083 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2024 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunClient

func RunClient(ctx context.Context, cfg *config.Client, logger logr.Logger)

Types

type Collector

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

func NewCollector

func NewCollector(
	listen string,
	handshakeTimeout time.Duration,
	logger logr.Logger,
	token string,
	targets []config.Target,
) *Collector

func (*Collector) Run

func (c *Collector) Run(ctx context.Context) error

type Communicator

type Communicator struct {
	ServerAddr        string
	ConnectTimeout    time.Duration
	ReconnectInterval time.Duration
	Token             string
	ObserverID        string
	Logger            logr.Logger
	ConfigUpdate      chan<- *protocol.ServerPushInfo
	StateReport       <-chan *protocol.Observation
	// contains filtered or unexported fields
}

func (*Communicator) Run

func (c *Communicator) Run(ctx context.Context)

Run blocks until StateReport or ctx is closed

type Observer

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

type Pinger

type Pinger struct {
	Logger   logr.Logger
	Output   chan<- *protocol.Observation
	Interval time.Duration
	// contains filtered or unexported fields
}

func (*Pinger) Run

func (p *Pinger) Run(ctx context.Context)

func (*Pinger) UpdateTargets

func (p *Pinger) UpdateTargets(targets []protocol.Target)

Jump to

Keyboard shortcuts

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