probe

package
v0.0.0-...-554ed94 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

README

Quick overview

Information gatherers

These implement the Reporter interface

  • awsecs Deals with talking to AWS ECS to get stats and info
  • docker Inspects the docker status
  • endpoint Gathers connection data
  • host Gets data from the host os, including things like CPU and mem stats
  • kubernetes Gathers data from k8s
  • overlay Talks to nholuongut Net for network stats from the overlay network
  • process Is code that looks up running process and stats form the os

Utility and control

  • appclient Deals with generating and sending reports
  • controls Utility code for control messages and the like
  • plugins allows plugins to be added to the probe.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Probe

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

Probe sits there, generating and publishing reports.

func New

func New(
	spyInterval, publishInterval time.Duration,
	publisher ReportPublisher,
	noControls bool,
) *Probe

New makes a new Probe.

func (*Probe) AddReporter

func (p *Probe) AddReporter(rs ...Reporter)

AddReporter adds a new Reported to the Probe

func (*Probe) AddTagger

func (p *Probe) AddTagger(ts ...Tagger)

AddTagger adds a new Tagger to the Probe

func (*Probe) AddTicker

func (p *Probe) AddTicker(ts ...Ticker)

AddTicker adds a new Ticker to the Probe

func (*Probe) Publish

func (p *Probe) Publish(rpt report.Report)

Publish will queue a report for immediate publication, bypassing the spy tick

func (*Probe) Start

func (p *Probe) Start()

Start starts the probe

func (*Probe) Stop

func (p *Probe) Stop() error

Stop stops the probe

type ReportPublisher

type ReportPublisher interface {
	Publish(r report.Report) error
}

ReportPublisher publishes reports, probably to a remote collector.

type Reporter

type Reporter interface {
	Name() string
	Report() (report.Report, error)
}

Reporter generates Reports.

func ReporterFunc

func ReporterFunc(name string, f func() (report.Report, error)) Reporter

ReporterFunc uses a function to implement a Reporter

type Tagger

type Tagger interface {
	Name() string
	Tag(r report.Report) (report.Report, error)
}

Tagger tags nodes with value-add node metadata.

func NewTopologyTagger

func NewTopologyTagger() Tagger

NewTopologyTagger tags each node with the topology that it comes from. It's kind of a proof-of-concept tagger, useful primarily for debugging.

type Ticker

type Ticker interface {
	Name() string
	Tick() error
}

Ticker is something which will be invoked every spyDuration. It's useful for things that should be updated on that interval. For example, cached shared state between Taggers and Reporters.

Directories

Path Synopsis
procspy
Package procspy lists TCP connections, and optionally tries to find the owning processes.
Package procspy lists TCP connections, and optionally tries to find the owning processes.

Jump to

Keyboard shortcuts

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