Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bus ¶
type Bus struct { // Controller is the directive controller. directive.Controller // contains filtered or unexported fields }
Bus is an in-memory controller bus.
func NewBus ¶
func NewBus(dc directive.Controller) *Bus
NewBus constructs a new in-memory Bus with a directive controller.
func (*Bus) ExecuteController ¶
func (b *Bus) ExecuteController(ctx context.Context, c controller.Controller) (err error)
ExecuteController adds a controller to the bus and calls Execute(). Any fatal error in the controller is returned. The controller will receive directive callbacks. If the controller returns nil, call RemoveController to remove the controller.
func (*Bus) GetControllers ¶
func (b *Bus) GetControllers() []controller.Controller
GetControllers returns a list of all currently active controllers.
func (*Bus) RemoveController ¶
func (b *Bus) RemoveController(c controller.Controller)
RemoveController removes the controller from the bus.
Click to show internal directories.
Click to hide internal directories.