SetEnabled flips recording on or off. The UI calls this from the /debug slash command. Disabling does not clear the ring — old events stick around until Clear() or the harness exits.
(b bool)
| 66 | // slash command. Disabling does not clear the ring — old events stick around |
| 67 | // until Clear() or the harness exits. |
| 68 | func SetEnabled(b bool) { |
| 69 | mu.Lock() |
| 70 | enabled = b |
| 71 | mu.Unlock() |
| 72 | } |
| 73 | |
| 74 | // SetSink registers a callback fired on each Record. The TUI uses it to nudge |
| 75 | // a re-render of the debug panel. Pass nil to unregister. |
no outgoing calls