Package metricsmap represents the BPF metrics map in the BPF programs. It is
implemented as a hash table containing an entry of different drop and forward
counts for different drop/forward reasons and directions.
+groupName=maps
const (
// MapName for metrics map. MapName = "cilium_metrics"
// MaxEntries is the maximum number of keys that can be present in the// Metrics Map.//// Currently max. 2 bits of the Key.Dir member are used (unknown,// ingress or egress). Thus we can reduce from the theoretical max. size// of 2**16 (2 uint8) to 2**10 (1 uint8 + 2 bits).
MaxEntries = 1024
)
SyncMetricsMap is called periodically to sync off the metrics map by
aggregating it into drops (by drop reason and direction) and
forwards (by direction) with the prometheus server.
IterateCallback represents the signature of the callback function expected by
the IterateWithCallback method, which in turn is used to iterate all the
keys/values of a metrics map.