Documentation
¶
Index ¶
- type Controller
- func (c *Controller) Close() error
- func (c *Controller) Execute(ctx context.Context) error
- func (c *Controller) GetControllerInfo() *controller.Info
- func (c *Controller) GetReporter(ctx context.Context) (reporter.Reporter, error)
- func (c *Controller) HandleDirective(ctx context.Context, di directive.Instance) ([]directive.Resolver, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
Controller manages a Entity Graph reporter. It handles CollectEntityGraph directives.
func NewController ¶
func NewController( le *logrus.Entry, bus bus.Bus, info *controller.Info, ctor reporter.Constructor, ) *Controller
NewController constructs a new entitygraph reporter controller.
func (*Controller) Close ¶
func (c *Controller) Close() error
Close releases any resources used by the controller. Error indicates any issue encountered releasing.
func (*Controller) Execute ¶
func (c *Controller) Execute(ctx context.Context) error
Execute executes the given controller. Returning nil ends execution. Returning an error triggers a retry with backoff.
func (*Controller) GetControllerInfo ¶
func (c *Controller) GetControllerInfo() *controller.Info
GetControllerInfo returns information about the controller.
func (*Controller) GetReporter ¶
GetReporter returns the controlled reporter. This may wait for the reporter to be ready.
func (*Controller) HandleDirective ¶
func (c *Controller) 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 unexpected errors are returned for logging. It is safe to add a reference to the directive during this call.