GetState returns current state using atomic counter for lock-free operation.
()
| 341 | |
| 342 | // GetState returns current state using atomic counter for lock-free operation. |
| 343 | func (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. |
| 351 | func (hm *Manager) processPreHooks(ctx context.Context, notificationCtx push.NotificationHandlerContext, notificationType string, notification []interface{}) ([]interface{}, bool) { |