Help us shape the future of Go! Take the 2026 Go Developer Survey

endpointmanager

package
v0.10.0 Latest Latest
Warning

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

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

Documentation

Overview

Package endpointmanager manages the list of all local endpoints

Index

Constants

View Source
const (
	// GcInterval is the garbage collection interval.
	GcInterval int = 10
)

Variables

View Source
var (
	// Mutex protects Endpoints and endpointsAux
	//
	// Warning: This lock may not be taken while an individual endpoint
	// lock is being held. If you require to hold both, then the global
	// endpointmanager lock must always be acquired first.
	Mutex sync.RWMutex

	// Endpoints is the global list of endpoints indexed by ID. Mutex must
	// be held to read and write.
	//
	// FIXME: This is currently exported, as more code moves from daemon
	// into pkg/endpoint, we might be able to unexport this
	Endpoints = map[uint16]*endpoint.Endpoint{}
)

Functions

func EnableConntrackGC

func EnableConntrackGC(ipv4, ipv6 bool)

EnableConntrackGC enables the connection tracking garbage collection.

func Insert

func Insert(ep *endpoint.Endpoint)

Insert inserts the endpoint into the global maps

func LinkContainerID

func LinkContainerID(ep *endpoint.Endpoint)

LinkContainerID links an endpoint and makes it searchable by Docker ID. Mutex must be held

func Lookup

func Lookup(id string) (*endpoint.Endpoint, error)

Lookup looks up the endpoint by prefix id

func LookupCiliumID

func LookupCiliumID(id uint16) *endpoint.Endpoint

LookupCiliumID looks up endpoint by endpoint ID

func LookupCiliumIDLocked

func LookupCiliumIDLocked(id uint16) *endpoint.Endpoint

LookupCiliumIDLocked looks up endpoint by endpoint ID with Mutex held

func LookupDockerID

func LookupDockerID(id string) *endpoint.Endpoint

LookupDockerID looks up endpoint by Docker ID

func LookupIPv4

func LookupIPv4(ipv4 string) *endpoint.Endpoint

LookupIPv4 looks up endpoint by IPv4 address

func LookupLocked

func LookupLocked(id string) (*endpoint.Endpoint, error)

LookupLocked looks up the endpoint by prefix id with the Mutex already held

func RemoveLocked

func RemoveLocked(ep *endpoint.Endpoint)

RemoveLocked removes the endpoint from the global maps. Mutex must be held

func RmCTEntriesOf

func RmCTEntriesOf(ipv4Enabled bool, e *endpoint.Endpoint, ids map[uint32]bool)

RmCTEntriesOf cleans the connection tracking table of the given endpoint `e` by removing the CT's entries that have the src_sec_id equal to any of keys in the ids' map.

func RunGC

func RunGC(e *endpoint.Endpoint, isLocal, isIPv6 bool, filter *ctmap.GCFilter)

RunGC run CT's garbage collector for the given endpoint. `isLocal` refers if the CT map is set to local. If `isIPv6` is set specifies that is the IPv6 map. `filter` represents the filter type to be used while looping all CT entries.

func TriggerPolicyUpdates

func TriggerPolicyUpdates(owner endpoint.Owner) *sync.WaitGroup

TriggerPolicyUpdates calls TriggerPolicyUpdates for each endpoint and regenerates as required. During this process, the endpoint list is locked and cannot be modified. Returns a waiting group that can be used to know when all the endpoints are regenerated.

func UpdateReferences

func UpdateReferences(ep *endpoint.Endpoint)

UpdateReferences makes an endpoint available by all possible reference fields as available for this endpoint (containerID, IPv4 address, ...)

Types

This section is empty.

Jump to

Keyboard shortcuts

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