endpointManager is a structure designed for containing state about the collection of locally running endpoints.
| 49 | // endpointManager is a structure designed for containing state about the |
| 50 | // collection of locally running endpoints. |
| 51 | type endpointManager struct { |
| 52 | logger *slog.Logger |
| 53 | |
| 54 | config EndpointManagerConfig |
| 55 | |
| 56 | health cell.Health |
| 57 | |
| 58 | // mutex protects endpoints and endpointsAux |
| 59 | mutex lock.RWMutex |
| 60 | |
| 61 | // endpoints is the global list of endpoints indexed by ID. mutex must |
| 62 | // be held to read and write. |
| 63 | endpoints map[uint16]*endpoint.Endpoint |
| 64 | endpointsAux map[string]*endpoint.Endpoint |
| 65 | |
| 66 | // mcastManager handles IPv6 multicast group join/leave for pods. This is required for the |
| 67 | // node to receive ICMPv6 NDP messages, especially NS (Neighbor Solicitation) message, so |
| 68 | // pod's IPv6 address is discoverable. |
| 69 | mcastManager *mcastmanager.MCastManager |
| 70 | |
| 71 | // EndpointSynchronizer updates external resources (e.g., Kubernetes) with |
| 72 | // up-to-date information about endpoints managed by the endpoint manager. |
| 73 | EndpointResourceSynchronizer |
| 74 | |
| 75 | // subscribers are notified when events occur in the endpointManager. |
| 76 | subscribers map[Subscriber]struct{} |
| 77 | |
| 78 | // checkHealth supports endpoint garbage collection by verifying the health |
| 79 | // of an endpoint. |
| 80 | checkHealth EndpointCheckerFunc |
| 81 | |
| 82 | // deleteEndpoint is the function used to remove the endpoint from the |
| 83 | // endpointManager and clean it up. Always set to RemoveEndpoint. |
| 84 | deleteEndpoint endpointDeleteFunc |
| 85 | |
| 86 | // A mark-and-sweep garbage collector may operate on the endpoint list. |
| 87 | // This is configured via WithPeriodicEndpointGC() and will mark |
| 88 | // endpoints for removal on one run of the controller, then in the |
| 89 | // subsequent controller run will remove the endpoints. |
| 90 | markedEndpoints []uint16 |
| 91 | |
| 92 | // controllers associated with the endpoint manager. |
| 93 | controllers *controller.Manager |
| 94 | |
| 95 | policyMapPressure *policyMapPressure |
| 96 | |
| 97 | // localNodeStore allows to retrieve information and observe changes about |
| 98 | // the local node. |
| 99 | localNodeStore *node.LocalNodeStore |
| 100 | |
| 101 | // Allocator for local endpoint identifiers. |
| 102 | epIDAllocator *epIDAllocator |
| 103 | |
| 104 | monitorAgent monitoragent.Agent |
| 105 | |
| 106 | policyUpdateCallbackDetails |
| 107 | } |
| 108 |
nothing calls this directly
no outgoing calls
no test coverage detected