mirror of
https://github.com/openziti/ziti.git
synced 2026-10-26 05:30:03 +00:00
af20635fd9
- applies controller lists, leader announcements and new controller addresses on one goroutine, in the order they arrive, so checking an update's index, applying it and recording it is one step - replaces the router's controller endpoints only from a leader's list at a newer index; a leader's list at the recorded index, or a follower's list at or above it, only adds endpoints - applies leader announcements on the same goroutine, against their own recorded index - keeps receive goroutines from waiting on an update being applied, and bounds the waiting updates by dropping follower lists and keeping each controller's newest leader list, announcement and address - ignores an empty new controller address - marks a controller's on-connect list as the leader's when it leads, so a connecting router still drops controllers the cluster removed - builds the handler once per router rather than in package-level singletons - adds NetworkControllers.GetEndpoints - tests list handling, ordering against index resets and announcements, and the bound on waiting updates