Documentation ¶
Index ¶
- func CountEntries(id ebpf.MapID) (int, error)
- func FormatBytes(format DisplayFormat, value []byte) string
- func IsLookupSupported(mt ebpf.MapType) bool
- func IsPerCPU(mt ebpf.MapType) bool
- func RestoreBytes(format DisplayFormat, value string, expectedSize uint32) ([]byte, error)
- type DisplayFormat
- type MapEntries
- type MapEntry
- type MapExportConfiguration
- type MapInfo
- type MapsWatcher
- type WatcherOpts
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatBytes ¶ added in v0.0.2
func FormatBytes(format DisplayFormat, value []byte) string
func IsLookupSupported ¶ added in v0.0.2
func RestoreBytes ¶ added in v0.0.4
func RestoreBytes(format DisplayFormat, value string, expectedSize uint32) ([]byte, error)
Types ¶
type DisplayFormat ¶ added in v0.0.2
type DisplayFormat = string
const ( DisplayFormatHex DisplayFormat = "hex" DisplayFormatString DisplayFormat = "string" DisplayFormatNumber DisplayFormat = "number" )
type MapEntries ¶ added in v0.0.2
type MapEntries struct {
Entries []*MapEntry
}
func GetEntries ¶ added in v0.0.2
func GetEntries(id ebpf.MapID, sort bool) (*MapEntries, error)
type MapExportConfiguration ¶ added in v0.0.2
type MapExportConfiguration struct { StartID int EndID int MetricNameRegexp regexp.Regexp KeyFormat DisplayFormat }
func ParseMapExportConfiguration ¶ added in v0.0.2
func ParseMapExportConfiguration(config string) (*MapExportConfiguration, error)
type MapsWatcher ¶
type MapsWatcher interface { Run(ctx context.Context, refreshInterval time.Duration) GetMaps() ([]*MapInfo, error) GetMap(id ebpf.MapID) (*MapInfo, error) RegisterMetrics(registry *prometheus.Registry) AddExportConfig(config *MapExportConfiguration) PinMap(id ebpf.MapID, path string) error UpdateMapValue(id ebpf.MapID, key string, cpu *int, value string, keyFormat DisplayFormat, mapsFormat DisplayFormat) error CreateMapValue(id ebpf.MapID, key string, values []string, keyFormat DisplayFormat, mapsFormat DisplayFormat) error DeleteMapValue(id ebpf.MapID, key string, keyFormat DisplayFormat) error }
func NewWatcher ¶
func NewWatcher(logger zerolog.Logger, bpfDir string) MapsWatcher
type WatcherOpts ¶ added in v0.0.2
Click to show internal directories.
Click to hide internal directories.