nodemap

package
v1.14.0-snapshot.1 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

+groupName=maps

Index

Constants

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

Variables

This section is empty.

Functions

func SetNodeMap added in v1.11.15

func SetNodeMap(m *Map)

SetNodeMap sets the node map. Only used for testing.

Types

type Map

type Map struct {
	*ebpf.Map
}

func NewNodeMap added in v1.11.15

func NewNodeMap(mapName string) *Map

func NodeMap added in v1.11.15

func NodeMap() *Map

func (*Map) Delete

func (m *Map) Delete(ip net.IP) error

func (Map) IterateWithCallback

func (m Map) IterateWithCallback(cb NodeIterateCallback) error

IterateWithCallback iterates through all the keys/values of a node map, passing each key/value pair to the cb callback.

func (*Map) Update

func (m *Map) Update(ip net.IP, nodeID uint16) error

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
}

Jump to

Keyboard shortcuts

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