probe

package
v0.16.1 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2016 License: Apache-2.0 Imports: 6 Imported by: 0

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 appclient.Publisher,
	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()

Stop stops the probe

type Reporter

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

Reporter generates Reports.

func ReporterFunc added in v0.14.0

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