registerHooks registers hook handlers for this session. Hooks are called at various points during session execution to allow customization and observation of the session lifecycle. This method is internal and typically called when creating a session.
(hooks *SessionHooks)
| 697 | // |
| 698 | // This method is internal and typically called when creating a session. |
| 699 | func (s *Session) registerHooks(hooks *SessionHooks) { |
| 700 | s.hooksMux.Lock() |
| 701 | defer s.hooksMux.Unlock() |
| 702 | s.hooks = hooks |
| 703 | } |
| 704 | |
| 705 | // getHooks returns the currently registered hooks, or nil. |
| 706 | func (s *Session) getHooks() *SessionHooks { |
no outgoing calls