config

package
v0.0.14-ebpf Latest Latest
Warning

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

Go to latest
Published: May 19, 2021 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultCommonConfig = &CommonConfig{
	CollectTCPConns:           true,
	CollectUDPConns:           true,
	MaxConnections:            10000,
	UDPConnTimeout:            30 * time.Second,
	FilterInactiveConnections: true,
	HttpMetricPrecision:       0.01,
	EnableTracepipeLogging:    false,
}
View Source
var DefaultConfig = &Config{
	CommonConfig: *DefaultCommonConfig,
}

DefaultConfig enables traffic collection for all connection types

Functions

This section is empty.

Types

type CommonConfig

type CommonConfig struct {
	// CollectTCPConns specifies whether the tracer should collect traffic statistics for TCP connections
	CollectTCPConns bool
	// CollectUDPConns specifies whether the tracer should collect traffic statistics for UDP connections
	CollectUDPConns bool
	// Maximum connections we keep track of
	MaxConnections int
	// UDPConnTimeout determines the length of traffic inactivity between two (IP, port)-pairs before declaring a UDP
	// connection as inactive.
	// Note: As UDP traffic is technically "connection-less", for tracking, we consider a UDP connection to be traffic
	//       between a source and destination IP and port.
	UDPConnTimeout time.Duration
	// Boolean flag to set whether connections should be dropped if no data is transferred.
	FilterInactiveConnections bool
	// Specifies targeted percentile's precision, the more precision - the more measurements we should keep
	// hence more memory is needed and more data will be transferred
	HttpMetricPrecision float64
	// Enable reading and logging bpf_trace_printk from a running eBPF program
	EnableTracepipeLogging bool
}

func MakeCommonConfig

func MakeCommonConfig() *CommonConfig

type Config

type Config struct {
	CommonConfig
}

func MakeDefaultConfig

func MakeDefaultConfig() *Config

Jump to

Keyboard shortcuts

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