maps

package
v1.19.0 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2026 License: Apache-2.0 Imports: 25 Imported by: 5

Documentation

Overview

Package maps performs various lifecycle operations related to maps in the datapath.

Index

Constants

This section is empty.

Variables

View Source
var Cell = cell.Module(
	"maps-cleanup",
	"Cleanup of stale and disabled BPF maps",
	cell.Invoke(registerMapSweeper),
)

Functions

This section is empty.

Types

type EndpointMapManager added in v1.19.0

type EndpointMapManager struct {
	endpointmanager.EndpointManager
	// contains filtered or unexported fields
}

EndpointMapManager is a wrapper around an endpointmanager as well as the filesystem for removing maps related to endpoints from the filesystem.

func (*EndpointMapManager) ListMapsDir added in v1.19.0

func (e *EndpointMapManager) ListMapsDir(path string) []string

ListMapsDir gives names of files (or subdirectories) found in the specified path.

func (*EndpointMapManager) RemoveDatapathMapping added in v1.19.0

func (e *EndpointMapManager) RemoveDatapathMapping(endpointID uint16) error

RemoveDatapathMapping unlinks the endpointID from the global policy map, preventing packets that arrive on this node from being forwarded to the endpoint that used to exist with the specified ID.

func (*EndpointMapManager) RemoveMapPath added in v1.19.0

func (e *EndpointMapManager) RemoveMapPath(path string)

RemoveMapPath removes the specified path from the filesystem.

type MapSweeper

type MapSweeper struct {
	// contains filtered or unexported fields
}

MapSweeper is responsible for checking stale map paths on the filesystem and garbage collecting the endpoint if the corresponding endpoint no longer exists.

func (*MapSweeper) CollectStaleMapGarbage

func (ms *MapSweeper) CollectStaleMapGarbage()

CollectStaleMapGarbage cleans up stale content in the BPF maps from the datapath.

func (*MapSweeper) RemoveDisabledMaps

func (ms *MapSweeper) RemoveDisabledMaps()

RemoveDisabledMaps removes BPF maps in the filesystem for features that have been disabled. The maps may still be in use in which case they will continue to live until the BPF program using them is being replaced.

type PrefixedMap added in v1.17.7

type PrefixedMap struct {
	Prefix   string
	Excludes []string
}

PrefixedMap describes a pattern for filtering map files. It specifies which files to match via Prefix and which to exclude via Excludes.

Jump to

Keyboard shortcuts

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