traffic

package
v0.0.0-...-311f451 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Collector

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

func NewCollector

func NewCollector() *Collector

func (*Collector) Add

func (c *Collector) Add(source, destination serviceidentity.ServiceIdentity, bytes, flows int)

func (*Collector) PeriodicUpload

func (c *Collector) PeriodicUpload(ctx context.Context, interval time.Duration)

func (*Collector) RegisterNotifyTraffic

func (c *Collector) RegisterNotifyTraffic(callback TrafficLevelCallbackFunc)

type TrafficLevelCallbackFunc

type TrafficLevelCallbackFunc func(context.Context, TrafficLevelMap)

type TrafficLevelCounter

type TrafficLevelCounter map[TrafficLevelKey][]TrafficLevelData

type TrafficLevelData

type TrafficLevelData struct {
	Bytes int
	Flows int
	// contains filtered or unexported fields
}

type TrafficLevelKey

type TrafficLevelKey struct {
	SourceName           string
	SourceNamespace      string
	DestinationName      string
	DestinationNamespace string
}

type TrafficLevelMap

type TrafficLevelMap map[TrafficLevelKey]TrafficLevelData

Jump to

Keyboard shortcuts

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