Documentation
¶
Overview ¶
package enabler contains a component that can be enabled and disabled dynamically
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Enabler ¶
An Enabler enables or disables a component dynamically. When the Enabler is enabled, the Handler's RunEnabled will be called. If the Enabler is subsequently disabled the context passed to RunEnabled will be canceled. If the Enabler is subseqently enabled again, RunEnabled will be called again. Handlers should obey the context lifetime and be tolerant of RunEnabled being called multiple times. (not concurrently)
type HandlerFunc ¶
HandlerFunc is a function run by the enabler.
func (HandlerFunc) RunEnabled ¶
func (f HandlerFunc) RunEnabled(ctx context.Context) error
Click to show internal directories.
Click to hide internal directories.