flow

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2024 License: Apache-2.0 Imports: 11 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CollectMetrics added in v1.0.13

func CollectMetrics(options ...option) error

CollectMetrics collects the metrics for the flows. This function will continue to run until the context is cancel.

func New

New creates a new flow

func WithConduitName added in v1.0.13

func WithConduitName(conduitName string) option

WithConduitName specifies the conduit attribute.

func WithGetFlowStatsFunc added in v1.0.13

func WithGetFlowStatsFunc(getFlowStatsFunc GetFlowStats) option

WithGetFlowStatsFunc specifies which function will be used to get the flow metrics.

func WithMeter added in v1.0.13

func WithMeter(meter metric.Meter) option

WithMeter specifies the meter for the metric collection.

func WithTrenchName added in v1.0.13

func WithTrenchName(trenchName string) option

WithTrenchName specifies the trench attribute.

Types

type Flow

type Flow struct {
	*nspAPI.Flow
	// contains filtered or unexported fields
}

Flow holds flow data

func (*Flow) Delete

func (f *Flow) Delete() error

Delete deletes a flow

func (*Flow) Update

func (f *Flow) Update(flow *nspAPI.Flow) error

Update updates a flow

type FlowStat added in v1.0.13

type FlowStat interface {
	GetFlow() *nspAPI.Flow
	GetMatchesCount() int
}

type GetFlowStats added in v1.0.13

type GetFlowStats func() ([]FlowStat, error)

Jump to

Keyboard shortcuts

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