targets

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: 19 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrTargetTypeUnknown target type unknown
	ErrTargetTypeUnknown = errors.New("target type unknown")
)

Functions

This section is empty.

Types

type ERSpanTarget

type ERSpanTarget struct {
	SessionID uint16
	IfIndex   uint32
	// contains filtered or unexported fields
}

ERSpanTarget defines a ERSpanTarget target

func NewERSpanTarget

func NewERSpanTarget(g *graph.Graph, n *graph.Node, capture *types.Capture) (*ERSpanTarget, error)

NewERSpanTarget returns a new ERSpan target

func (*ERSpanTarget) SendPacket

func (ers *ERSpanTarget) SendPacket(packet gopacket.Packet, bpf *flow.BPF)

SendPacket implements the Target interface

func (*ERSpanTarget) SendStats added in v0.26.0

func (ers *ERSpanTarget) SendStats(stats flow.Stats)

SendStats implements the Target interface

func (*ERSpanTarget) Start

func (ers *ERSpanTarget) Start()

Start start the target

func (*ERSpanTarget) Stop

func (ers *ERSpanTarget) Stop()

Stop stops the target

type LocalTarget

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

LocalTarget send packet to an agent flow table

func NewLocalTarget

func NewLocalTarget(g *graph.Graph, n *graph.Node, capture *types.Capture, uuids flow.UUIDs, fta *flow.TableAllocator) (*LocalTarget, error)

NewLocalTarget returns a new local target

func (*LocalTarget) SendPacket

func (l *LocalTarget) SendPacket(packet gopacket.Packet, bpf *flow.BPF)

SendPacket implements the Target interface

func (*LocalTarget) SendStats added in v0.26.0

func (l *LocalTarget) SendStats(stats flow.Stats)

SendStats implements the flow Sender interface

func (*LocalTarget) Start

func (l *LocalTarget) Start()

Start target

func (*LocalTarget) Stop

func (l *LocalTarget) Stop()

Stop target

type NetFlowV5Target

type NetFlowV5Target struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

NetFlowV5Target defines a NetFlow v5 target

func NewNetFlowV5Target

func NewNetFlowV5Target(g *graph.Graph, n *graph.Node, capture *types.Capture, uuids flow.UUIDs) (*NetFlowV5Target, error)

NewNetFlowV5Target returns a new NetFlow v5 target

func (*NetFlowV5Target) SendFlows

func (nf *NetFlowV5Target) SendFlows(flows []*flow.Flow)

SendFlows implements the flow Sender interface

func (*NetFlowV5Target) SendPacket

func (nf *NetFlowV5Target) SendPacket(packet gopacket.Packet, bpf *flow.BPF)

SendPacket implements the Target interface

func (*NetFlowV5Target) SendStats added in v0.26.0

func (nf *NetFlowV5Target) SendStats(stats flow.Stats)

SendStats implements the flow Sender interface

func (*NetFlowV5Target) Start

func (nf *NetFlowV5Target) Start()

Start start the target

func (*NetFlowV5Target) Stop

func (nf *NetFlowV5Target) Stop()

Stop stops the target

type Target

type Target interface {
	SendPacket(packet gopacket.Packet, bpf *flow.BPF)
	SendStats(stats flow.Stats)
	Start()
	Stop()
}

Target interface

func NewTarget

func NewTarget(typ string, g *graph.Graph, n *graph.Node, capture *types.Capture, uuids flow.UUIDs, bpf *flow.BPF, fta *flow.TableAllocator) (Target, error)

NewTarget returns target according to the given type

Jump to

Keyboard shortcuts

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