Fix formatting of API server diagram

This commit is contained in:
Nick Turner 2022-11-06 16:41:11 -08:00
parent 3efd107eb2
commit 02e3fbfeff

View File

@ -418,44 +418,40 @@ func (s *GenericAPIServer) PrepareRun() preparedGenericAPIServer {
// or the secure port cannot be listened on initially. // or the secure port cannot be listened on initially.
// This is the diagram of what channels/signals are dependent on each other: // This is the diagram of what channels/signals are dependent on each other:
// //
// stopCh // | stopCh
// |
// ---------------------------------------------------------
// | | // | |
// ShutdownInitiated (shutdownInitiatedCh) | // | ---------------------------------------------------------
// | | |
// | ShutdownInitiated (shutdownInitiatedCh) |
// | | |
// | (ShutdownDelayDuration) (PreShutdownHooks)
// | | |
// | AfterShutdownDelayDuration (delayedStopCh) PreShutdownHooksStopped (preShutdownHooksHasStoppedCh)
// | | |
// | |-------------------------------------------------------|
// | | // | |
//
// (ShutdownDelayDuration) (PreShutdownHooks)
//
// | | // | |
// AfterShutdownDelayDuration (delayedStopCh) PreShutdownHooksStopped (preShutdownHooksHasStoppedCh) // | NotAcceptingNewRequest (notAcceptingNewRequestCh)
// | | // | |
// |-------------------------------------------------------| // | |
// | // | |---------------------------------------------------------|
// | // | | | | |
// NotAcceptingNewRequest (notAcceptingNewRequestCh) // | [without [with | |
// | // | ShutdownSendRetryAfter] ShutdownSendRetryAfter] | |
// | // | | | | |
// |---------------------------------------------------------| // | | ---------------| |
// | | | | // | | | |
// [without [with | | // | | (HandlerChainWaitGroup::Wait) |
//
// ShutdownSendRetryAfter] ShutdownSendRetryAfter] | |
//
// | | | | // | | | |
// | ---------------| | // | | InFlightRequestsDrained (drainedCh) |
// | | | |
// | ----------------------------------------|-----------------|
// | | | // | | |
// | (HandlerChainWaitGroup::Wait) | // | stopHttpServerCh (AuditBackend::Shutdown())
// | | |
// | InFlightRequestsDrained (drainedCh) |
// | | |
// ----------------------------------------|-----------------|
// | | // | |
// stopHttpServerCh (AuditBackend::Shutdown()) // | listenerStoppedCh
// | // | |
// listenerStoppedCh // | HTTPServerStoppedListening (httpServerStoppedListeningCh)
// |
// HTTPServerStoppedListening (httpServerStoppedListeningCh)
func (s preparedGenericAPIServer) Run(stopCh <-chan struct{}) error { func (s preparedGenericAPIServer) Run(stopCh <-chan struct{}) error {
delayedStopCh := s.lifecycleSignals.AfterShutdownDelayDuration delayedStopCh := s.lifecycleSignals.AfterShutdownDelayDuration
shutdownInitiatedCh := s.lifecycleSignals.ShutdownInitiated shutdownInitiatedCh := s.lifecycleSignals.ShutdownInitiated