Documentation ¶
Overview ¶
Package endpointmanager manages the list of all local endpoints
Index ¶
- Constants
- Variables
- func EnableConntrackGC(ipv4, ipv6 bool)
- func Insert(ep *endpoint.Endpoint)
- func LinkContainerID(ep *endpoint.Endpoint)
- func Lookup(id string) (*endpoint.Endpoint, error)
- func LookupCiliumID(id uint16) *endpoint.Endpoint
- func LookupCiliumIDLocked(id uint16) *endpoint.Endpoint
- func LookupDockerID(id string) *endpoint.Endpoint
- func LookupIPv4(ipv4 string) *endpoint.Endpoint
- func LookupLocked(id string) (*endpoint.Endpoint, error)
- func RemoveLocked(ep *endpoint.Endpoint)
- func RmCTEntriesOf(ipv4Enabled bool, e *endpoint.Endpoint, ids map[uint32]bool)
- func RunGC(e *endpoint.Endpoint, isLocal, isIPv6 bool, filter *ctmap.GCFilter)
- func TriggerPolicyUpdates(owner endpoint.Owner) *sync.WaitGroup
- func UpdateReferences(ep *endpoint.Endpoint)
Constants ¶
const ( // GcInterval is the garbage collection interval. GcInterval int = 10 )
Variables ¶
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 LinkContainerID ¶
LinkContainerID links an endpoint and makes it searchable by Docker ID. Mutex must be held
func LookupCiliumID ¶
LookupCiliumID looks up endpoint by endpoint ID
func LookupCiliumIDLocked ¶
LookupCiliumIDLocked looks up endpoint by endpoint ID with Mutex held
func LookupDockerID ¶
LookupDockerID looks up endpoint by Docker ID
func LookupIPv4 ¶
LookupIPv4 looks up endpoint by IPv4 address
func LookupLocked ¶
LookupLocked looks up the endpoint by prefix id with the Mutex already held
func RemoveLocked ¶
RemoveLocked removes the endpoint from the global maps. Mutex must be held
func RmCTEntriesOf ¶
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 ¶
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 ¶
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 ¶
UpdateReferences makes an endpoint available by all possible reference fields as available for this endpoint (containerID, IPv4 address, ...)
Types ¶
This section is empty.