MCPcopy Create free account
hub / github.com/chainreactors/EvilProxy / emitAuthUpdate

Method emitAuthUpdate

sdk/cliproxy/service.go:477–496  ·  view source on GitHub ↗
(ctx context.Context, update watcher.AuthUpdate)

Source from the content-addressed store, hash-verified

475}
476
477func (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
498func (s *Service) handleAuthUpdate(ctx context.Context, update watcher.AuthUpdate) {
499 s.handleAuthUpdates(ctx, []watcher.AuthUpdate{update})

Callers 2

wsOnConnectedMethod · 0.95
wsOnDisconnectedMethod · 0.95

Calls 2

handleAuthUpdateMethod · 0.95

Tested by

no test coverage detected