(ctx context.Context, update watcher.AuthUpdate)
| 475 | } |
| 476 | |
| 477 | func (s *Service) emitAuthUpdate(ctx context.Context, update watcher.AuthUpdate) { |
| 478 | if s == nil { |
| 479 | return |
| 480 | } |
| 481 | if ctx == nil { |
| 482 | ctx = context.Background() |
| 483 | } |
| 484 | if s.watcher != nil && s.watcher.DispatchRuntimeAuthUpdate(update) { |
| 485 | return |
| 486 | } |
| 487 | if s.authUpdates != nil { |
| 488 | select { |
| 489 | case s.authUpdates <- update: |
| 490 | return |
| 491 | default: |
| 492 | log.Debugf("auth update queue saturated, applying inline action=%v id=%s", update.Action, update.ID) |
| 493 | } |
| 494 | } |
| 495 | s.handleAuthUpdate(ctx, update) |
| 496 | } |
| 497 | |
| 498 | func (s *Service) handleAuthUpdate(ctx context.Context, update watcher.AuthUpdate) { |
| 499 | s.handleAuthUpdates(ctx, []watcher.AuthUpdate{update}) |
no test coverage detected