FireAsync dispatches an event asynchronously (non-blocking). Use for events where the result doesn't matter (PostToolUse, Notification, etc.).
(ctx context.Context, event HookEvent)
| 139 | // FireAsync dispatches an event asynchronously (non-blocking). |
| 140 | // Use for events where the result doesn't matter (PostToolUse, Notification, etc.). |
| 141 | func (m *Manager) FireAsync(ctx context.Context, event HookEvent) { |
| 142 | // Detach cancellation so a fire-and-forget hook runs to completion even |
| 143 | // after the triggering operation returns, while still inheriting any |
| 144 | // values carried on ctx. |
| 145 | go m.Fire(context.WithoutCancel(ctx), event) |
| 146 | } |
| 147 | |
| 148 | // Count returns the number of loaded hooks. |
| 149 | func (m *Manager) Count() int { |
no test coverage detected