nodemap

package
v1.14.0-snapshot.6 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

+groupName=maps

Index

Constants

View Source
const (
	MapName    = "cilium_node_map"
	MaxEntries = 16384
)

Variables

View Source
var Cell = cell.Module(
	"node-map",
	"eBPF map which contains information about node IDs and their IP addresses",

	cell.Provide(newNodeMap),
)

Cell provides the nodemap.Map which contains information about node IDs and their IP addresses.

Functions

This section is empty.

Types

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
}

Map provides access to the eBPF map node.

func LoadNodeMap

func LoadNodeMap() (Map, error)

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

type NodeIterateCallback func(*NodeKey, *NodeValue)

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 NodeKey

type NodeKey struct {
	Pad1   uint16 `align:"pad1"`
	Pad2   uint8  `align:"pad2"`
	Family uint8  `align:"family"`
	// represents both IPv6 and IPv4 (in the lowest four bytes)
	IP types.IPv6 `align:"$union0"`
}

func (*NodeKey) String

func (k *NodeKey) String() string

type NodeValue

type NodeValue struct {
	NodeID uint16
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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