probes

package
v0.26.0 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2019 License: Apache-2.0 Imports: 15 Imported by: 17

Documentation

Index

Constants

This section is empty.

Variables

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

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

Functions

func CapturesMetadataDecoder added in v0.24.0

func CapturesMetadataDecoder(raw json.RawMessage) (common.Getter, error)

CapturesMetadataDecoder implements a json message raw decoder

func NormalizeBPFFilter added in v0.24.0

func NormalizeBPFFilter(capture *types.Capture) string

NormalizeBPFFilter returns a normalized BPF filter in order to exclude traffic generated by skydive itself

func TableOptsFromCapture added in v0.26.0

func TableOptsFromCapture(capture *types.Capture) flow.TableOpts

TableOptsFromCapture is a helper that returns the flow options for a capture

Types

type CaptureMetadata added in v0.24.0

type CaptureMetadata struct {
	CaptureStats
	ID          string `json:",omitempty"`
	State       string `json:",omitempty"`
	Name        string `json:",omitempty"`
	Description string `json:",omitempty"`
	BPFFilter   string `json:",omitempty"`
	Type        string `json:",omitempty"`
	PCAPSocket  string `json:",omitempty"`
	MirrorOf    string `json:",omitempty"`
	SFlowSocket string `json:",omitempty"`
	Error       string `json:",omitempty"`
}

CaptureMetadata holds attributes and statistics about a capture easyjson:json gendecoder

func (*CaptureMetadata) GetField added in v0.26.0

func (obj *CaptureMetadata) GetField(key string) (interface{}, error)

func (*CaptureMetadata) GetFieldBool added in v0.26.0

func (obj *CaptureMetadata) GetFieldBool(key string) (bool, error)

func (*CaptureMetadata) GetFieldInt64 added in v0.26.0

func (obj *CaptureMetadata) GetFieldInt64(key string) (int64, error)

func (*CaptureMetadata) GetFieldKeys added in v0.26.0

func (obj *CaptureMetadata) GetFieldKeys() []string

func (*CaptureMetadata) GetFieldString added in v0.26.0

func (obj *CaptureMetadata) GetFieldString(key string) (string, error)

func (CaptureMetadata) MarshalEasyJSON added in v0.26.0

func (v CaptureMetadata) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (CaptureMetadata) MarshalJSON added in v0.26.0

func (v CaptureMetadata) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*CaptureMetadata) MatchBool added in v0.26.0

func (obj *CaptureMetadata) MatchBool(key string, predicate common.BoolPredicate) bool

func (*CaptureMetadata) MatchInt64 added in v0.26.0

func (obj *CaptureMetadata) MatchInt64(key string, predicate common.Int64Predicate) bool

func (*CaptureMetadata) MatchString added in v0.26.0

func (obj *CaptureMetadata) MatchString(key string, predicate common.StringPredicate) bool

func (*CaptureMetadata) UnmarshalEasyJSON added in v0.26.0

func (v *CaptureMetadata) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*CaptureMetadata) UnmarshalJSON added in v0.26.0

func (v *CaptureMetadata) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type CaptureStats added in v0.24.0

type CaptureStats struct {
	PacketsReceived  int64
	PacketsDropped   int64
	PacketsIfDropped int64
}

CaptureStats describes the statistics of a running capture easyjson:json gendecoder

func (*CaptureStats) GetField added in v0.26.0

func (obj *CaptureStats) GetField(key string) (interface{}, error)

func (*CaptureStats) GetFieldBool added in v0.26.0

func (obj *CaptureStats) GetFieldBool(key string) (bool, error)

func (*CaptureStats) GetFieldInt64 added in v0.26.0

func (obj *CaptureStats) GetFieldInt64(key string) (int64, error)

func (*CaptureStats) GetFieldKeys added in v0.26.0

func (obj *CaptureStats) GetFieldKeys() []string

func (*CaptureStats) GetFieldString added in v0.26.0

func (obj *CaptureStats) GetFieldString(key string) (string, error)

func (CaptureStats) MarshalEasyJSON added in v0.26.0

func (v CaptureStats) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (CaptureStats) MarshalJSON added in v0.26.0

func (v CaptureStats) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*CaptureStats) MatchBool added in v0.26.0

func (obj *CaptureStats) MatchBool(key string, predicate common.BoolPredicate) bool

func (*CaptureStats) MatchInt64 added in v0.26.0

func (obj *CaptureStats) MatchInt64(key string, predicate common.Int64Predicate) bool

func (*CaptureStats) MatchString added in v0.26.0

func (obj *CaptureStats) MatchString(key string, predicate common.StringPredicate) bool

func (*CaptureStats) UnmarshalEasyJSON added in v0.26.0

func (v *CaptureStats) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*CaptureStats) UnmarshalJSON added in v0.26.0

func (v *CaptureStats) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type Captures added in v0.24.0

type Captures []*CaptureMetadata

Captures holds the captures metadata easyjson:json gendecoder

func (*Captures) GetField added in v0.26.0

func (obj *Captures) GetField(key string) (interface{}, error)

func (*Captures) GetFieldBool added in v0.26.0

func (obj *Captures) GetFieldBool(key string) (bool, error)

func (*Captures) GetFieldInt64 added in v0.26.0

func (obj *Captures) GetFieldInt64(key string) (int64, error)

func (*Captures) GetFieldKeys added in v0.26.0

func (obj *Captures) GetFieldKeys() []string

func (*Captures) GetFieldString added in v0.26.0

func (obj *Captures) GetFieldString(key string) (string, error)

func (Captures) MarshalEasyJSON added in v0.26.0

func (v Captures) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (Captures) MarshalJSON added in v0.26.0

func (v Captures) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*Captures) MatchBool added in v0.26.0

func (obj *Captures) MatchBool(key string, predicate common.BoolPredicate) bool

func (*Captures) MatchInt64 added in v0.26.0

func (obj *Captures) MatchInt64(key string, predicate common.Int64Predicate) bool

func (*Captures) MatchString added in v0.26.0

func (obj *Captures) MatchString(key string, predicate common.StringPredicate) bool

func (*Captures) UnmarshalEasyJSON added in v0.26.0

func (v *Captures) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*Captures) UnmarshalJSON added in v0.26.0

func (v *Captures) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type Context added in v0.25.0

type Context struct {
	Logger logging.Logger
	Config config.Config
	Graph  *graph.Graph
	FTA    *flow.TableAllocator
	TB     *probe.Bundle
}

Context defines a context to be used by constructor of probes

type FlowProbeHandler added in v0.24.0

type FlowProbeHandler interface {
	probe.Handler // inheritance of the probe.Handler interface Start/Stop functions
	RegisterProbe(n *graph.Node, capture *types.Capture, e ProbeEventHandler) (Probe, error)
	UnregisterProbe(n *graph.Node, e ProbeEventHandler, p Probe) error
	CaptureTypes() []string
}

FlowProbeHandler defines flow probe mechanism

type Probe

type Probe = ondemand.Task

Probe defines an active flow probe

type ProbeEventHandler added in v0.24.0

type ProbeEventHandler interface {
	OnStarted(*CaptureMetadata)
	OnStopped()
	OnError(err error)
}

ProbeEventHandler used by probes to notify state

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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