Documentation ¶
Overview ¶
+groupName=maps
Index ¶
Constants ¶
const ( MapName = "cilium_node_map" DefaultMaxEntries = 16384 )
const (
MapNameV2 = "cilium_node_map_v2"
)
Variables ¶
var Cell = cell.Module( "node-map", "eBPF map which contains information about node IDs and their IP addresses", cell.Provide(newNodeMap), cell.Config(defaultConfig), )
Cell provides the nodemap.MapV2 which contains information about node IDs, SPIs, and their IP addresses.
Functions ¶
This section is empty.
Types ¶
type Config ¶ added in v1.15.4
type Config struct {
NodeMapMax uint32 `mapstructure:"bpf-node-map-max"`
}
type Map ¶
type Map interface { // Update inserts or updates the node map object associated with the provided // IP and node id. Update(ip net.IP, nodeID uint16) error // Delete deletes the node map object associated with the provided // IP. Delete(ip net.IP) error // IterateWithCallback iterates through all the keys/values of a node map, // passing each key/value pair to the cb callback. IterateWithCallback(cb NodeIterateCallback) error // Size returns what how many entries the node map is configured to hold. Size() uint32 }
Map provides access to the eBPF map node.
func LoadNodeMap ¶
LoadNodeMap loads the pre-initialized node map for access. This should only be used from components which aren't capable of using hive - mainly the Cilium CLI. It needs to initialized beforehand via the Cilium Agent.
type MapV2 ¶ added in v1.16.0
type MapV2 interface { // Update inserts or updates the node map object associated with the provided // IP, node id, and SPI. Update(ip net.IP, nodeID uint16, SPI uint8) error // Delete deletes the node map object associated with the provided // IP. Delete(ip net.IP) error // IterateWithCallback iterates through all the keys/values of a node map, // passing each key/value pair to the cb callback. IterateWithCallback(cb NodeIterateCallbackV2) error // Size returns what how many entries the node map is configured to hold. Size() uint32 }
MapV2 provides access to the eBPF map node.
MapV2 will mirror all writes into MapV1.
func LoadNodeMapV2 ¶ added in v1.16.0
LoadNodeMap loads the pre-initialized node map for access. This should only be used from components which aren't capable of using hive - mainly the Cilium CLI. It needs to initialized beforehand via the Cilium Agent.
type NodeIterateCallback ¶
NodeIterateCallback 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 node map.
type NodeIterateCallbackV2 ¶ added in v1.16.0
type NodeIterateCallbackV2 func(*NodeKey, *NodeValueV2)
NodeIterateCallback 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 node map.