probe

package
v0.28.0 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2021 License: Apache-2.0 Imports: 5 Imported by: 13

Documentation

Index

Constants

This section is empty.

Variables

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

ErrNotCompiled is thrown when a probe was not compiled within the binary

View Source
var ErrNotImplemented = errors.New("not implemented")

ErrNotImplemented unimplemented feature

View Source
var ErrNotRunning = errors.New("probe is not running")

ErrNotRunning is used when a probe is not running

View Source
var ErrNotStopped = errors.New("probe is not stopped")

ErrNotStopped is used when a not stopped probe is started

Functions

This section is empty.

Types

type Bundle added in v0.21.0

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

Bundle describes a bundle of probes (topology of flow)

func NewBundle added in v0.21.0

func NewBundle() *Bundle

NewBundle creates a new probe handler bundle

func (*Bundle) AddHandler added in v0.25.0

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

AddHandler adds a probe to the bundle

func (*Bundle) EnabledProbes added in v0.25.0

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

EnabledProbes returns all enabled probes name

func (*Bundle) GetHandler added in v0.25.0

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

GetHandler retrieve a specific handler

func (*Bundle) GetStatus added in v0.25.0

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

GetStatus returns the status of all the probes

func (*Bundle) Start added in v0.21.0

func (p *Bundle) Start() error

Start a bundle of probes

func (*Bundle) Stop added in v0.21.0

func (p *Bundle) Stop()

Stop a bundle of probes

type Handler added in v0.25.0

type Handler interface {
	Start() error
	Stop()
}

Handler describes a probe

type ServiceStatus added in v0.25.0

type ServiceStatus struct {
	Status service.State
}

ServiceStatus describes the status returned by GetStatus

Jump to

Keyboard shortcuts

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