inmem

package
v0.10.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 3, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL