probe

package
v0.0.0-...-1d39891 Latest Latest
Warning

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

Go to latest
Published: May 12, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrProbeNotCompiled = fmt.Errorf("probe not compiled")

ErrProbeNotCompiled is thrown when a flow probe was not compiled within the binary

Functions

This section is empty.

Types

type Bundle

type Bundle struct {
	common.RWMutex
	Handlers map[string]Handler
}

Bundle describes a bundle of probes (topology of flow)

func NewBundle

func NewBundle() *Bundle

NewBundle creates a new probe handler bundle

func (*Bundle) AddHandler

func (p *Bundle) AddHandler(typ string, handler Handler)

AddHandler adds a probe to the bundle

func (*Bundle) EnabledProbes

func (p *Bundle) EnabledProbes() []string

EnabledProbes returns all enabled probes name

func (*Bundle) GetHandler

func (p *Bundle) GetHandler(typ string) Handler

GetHandler retrieve a specific handler

func (*Bundle) GetStatus

func (p *Bundle) GetStatus() map[string]interface{}

GetStatus returns the status of all the probes

func (*Bundle) Start

func (p *Bundle) Start()

Start a bundle of probes

func (*Bundle) Stop

func (p *Bundle) Stop()

Stop a bundle of probes

type Handler

type Handler interface {
	Start()
	Stop()
}

Handler describes a ProbeHandler. A ProbeHandler aims to create probe

type ServiceStatus

type ServiceStatus struct {
	Status common.ServiceState
}

ServiceStatus describes the status returned by GetStatus

type StatusReporter

type StatusReporter interface {
	GetStatus() interface{}
}

StatusReporter can be implemented by probes to report their status

Jump to

Keyboard shortcuts

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