Documentation ¶
Index ¶
- Constants
- Variables
- type BusBridge
- func (b *BusBridge) Close() error
- func (b *BusBridge) Execute(ctx context.Context) error
- func (b *BusBridge) GetControllerInfo() *controller.Info
- func (b *BusBridge) HandleDirective(ctx context.Context, di directive.Instance) (directive.Resolver, error)
- func (b *BusBridge) SetDirectiveBridgeTarget(target bus.Bus)
- type BusBridgeResolver
- type FilterFn
Constants ¶
const ControllerID = "controllerbus/bus/bridge/1"
ControllerID is the controller identifier.
Variables ¶
var Version = semver.MustParse("0.0.1")
Version is the API version.
Functions ¶
This section is empty.
Types ¶
type BusBridge ¶
type BusBridge struct {
// contains filtered or unexported fields
}
BusBridge forwards directives to a bus.
func NewBusBridge ¶
NewBusBridge constructs a new bus bridge.
func (*BusBridge) Close ¶
Close releases any resources used by the controller. Error indicates any issue encountered releasing.
func (*BusBridge) Execute ¶
Execute executes the given controller. Returning nil ends execution. Returning an error triggers a retry with backoff.
func (*BusBridge) GetControllerInfo ¶
func (b *BusBridge) GetControllerInfo() *controller.Info
GetControllerInfo returns information about the controller.
func (*BusBridge) HandleDirective ¶
func (b *BusBridge) HandleDirective(ctx context.Context, di directive.Instance) (directive.Resolver, error)
HandleDirective asks if the handler can resolve the directive. If it can, it returns a resolver. If not, returns nil. Any exceptional errors are returned for logging. It is safe to add a reference to the directive during this call. The context passed is canceled when the directive instance expires.
func (*BusBridge) SetDirectiveBridgeTarget ¶
SetDirectiveBridgeTarget sets the target bus. must be called before HandleDirective and Execute (just after construct).
type BusBridgeResolver ¶
type BusBridgeResolver struct {
// contains filtered or unexported fields
}
BusBridgeResolver resolves directives by forwarding to antihero bus.
func NewBusBridgeResolver ¶
func NewBusBridgeResolver(target bus.Bus, dir directive.Directive) *BusBridgeResolver
NewBusBridgeResolver constructs a new BusBridgeResolver.
func (*BusBridgeResolver) Resolve ¶
func (r *BusBridgeResolver) Resolve(ctx context.Context, handler directive.ResolverHandler) error
Resolve resolves the values, emitting them to the handler.