act

package
v1.17.0-pre.3 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ActiveConnectionTrackingMapName = "cilium_lb_act"
	FailedConnectionTrackingMapName = "cilium_lb_fct"
)

Variables

View Source
var Cell = cell.Module(
	"active-connection-tracking",
	"eBPF map with counts of open-closed connections for each service-zone pair",

	cell.Provide(newActiveConnectionTrackingMap),
	cell.Config(defaultConfig),
)

Cell provides the ActiveConnectionTrackingMap which contains information about opened and closed connection to each service-zone pair.

Functions

This section is empty.

Types

type ActiveConnectionTrackerKey

type ActiveConnectionTrackerKey struct {
	SvcID uint16 `align:"svc_id"`
	Zone  uint8  `align:"zone"`
	Pad   uint8  `align:"pad"`
}

ActiveConnectionTrackerKey is the key to ActiveConnectionTrackingMap.

It must match 'struct lb_act_key' in "bpf/lib/act.h".

func (*ActiveConnectionTrackerKey) New

func (*ActiveConnectionTrackerKey) String

func (v *ActiveConnectionTrackerKey) String() string

type ActiveConnectionTrackerValue

type ActiveConnectionTrackerValue struct {
	Opened uint32 `align:"opened"`
	Closed uint32 `align:"closed"`
}

ActiveConnectionTrackerValue is the value in ActiveConnectionTrackingMap.

It must match 'struct lb_act_value' in "bpf/lib/act.h".

func (*ActiveConnectionTrackerValue) New

func (*ActiveConnectionTrackerValue) String

type ActiveConnectionTrackingIterateCallback

type ActiveConnectionTrackingIterateCallback func(*ActiveConnectionTrackerKey, *ActiveConnectionTrackerValue)

type ActiveConnectionTrackingMap

type ActiveConnectionTrackingMap interface {
	IterateWithCallback(context.Context, ActiveConnectionTrackingIterateCallback) error
	Delete(*ActiveConnectionTrackerKey) error
	SaveFailed(*ActiveConnectionTrackerKey, uint64) error
	RestoreFailed(*ActiveConnectionTrackerKey) (uint64, error)
}

type Config

type Config struct {
	EnableActiveConnectionTracking bool
}

func (Config) Flags

func (c Config) Flags(fs *pflag.FlagSet)

type FailedConnectionTrackerValue

type FailedConnectionTrackerValue struct {
	Failed uint32 `align:"failed"`
}

FailedConnectionTrackerValue is the value in FailedConnectionTrackingMap.

func (*FailedConnectionTrackerValue) New

func (*FailedConnectionTrackerValue) String

Jump to

Keyboard shortcuts

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