MCPcopy
hub / github.com/redis/go-redis / GetState

Method GetState

maintnotifications/manager.go:343–348  ·  view source on GitHub ↗

GetState returns current state using atomic counter for lock-free operation.

()

Source from the content-addressed store, hash-verified

341
342// GetState returns current state using atomic counter for lock-free operation.
343func (hm *Manager) GetState() State {
344 if hm.activeOperationCount.Load() > 0 {
345 return StateMoving
346 }
347 return StateIdle
348}
349
350// processPreHooks calls all pre-hooks and returns the modified notification and whether to continue processing.
351func (hm *Manager) processPreHooks(ctx context.Context, notificationCtx push.NotificationHandlerContext, notificationType string, notification []interface{}) ([]interface{}, bool) {

Callers 6

TestManagerRefactoringFunction · 0.95
initConnMethod · 0.45
TestCircuitBreakerFunction · 0.45
handleMovingMethod · 0.45

Calls 1

LoadMethod · 0.45

Tested by 4

TestManagerRefactoringFunction · 0.76
TestCircuitBreakerFunction · 0.36