collector

package
v0.13.1 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CurrentTimeGetter added in v0.3.0

func CurrentTimeGetter() func() time.Time

Types

type Collector

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

func New

func New(
	cfg Config,
	log logrus.FieldLogger,
	podsWatcher podsWatcher,
	conntracker conntrack.Client,
	ip2dns dnsRecorder,
	currentTimeGetter func() time.Time,
) *Collector

func (*Collector) GetRawNetworkMetricsHandler added in v0.8.0

func (c *Collector) GetRawNetworkMetricsHandler(w http.ResponseWriter, req *http.Request)

func (*Collector) Start

func (c *Collector) Start(ctx context.Context) error

type Config

type Config struct {
	// ReadInterval used for conntrack records scrape.
	ReadInterval time.Duration
	// CleanupInterval used to remove expired conntrack and pod metrics records.
	CleanupInterval time.Duration
	// NodeName is current node name on which egressd is running.
	NodeName string
	// ExcludeNamespaces allows to exclude namespaces. Input is comma separated string.
	ExcludeNamespaces string
	// GroupPublicIPs will group all public destinations under single 0.0.0.0 IP.
	GroupPublicIPs bool
	// SendTrafficDelta used to determines if traffic should be sent as delta of 2 consecutive conntrack entries
	// or as the constantly growing counter value
	SendTrafficDelta bool
	LogEntries       bool
}

Jump to

Keyboard shortcuts

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