Register associates a factory with a hook type, replacing any prior one.
(t HookType, f HandlerFactory)
| 101 | |
| 102 | // Register associates a factory with a hook type, replacing any prior one. |
| 103 | func (r *Registry) Register(t HookType, f HandlerFactory) { |
| 104 | r.factories.Store(t, f) |
| 105 | } |
| 106 | |
| 107 | // Lookup returns the factory registered for t, or (nil, false). |
| 108 | func (r *Registry) Lookup(t HookType) (HandlerFactory, bool) { |