controller

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package controller contains interfaces that the engine uses to consume controllers for each of the message handler types.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

type Controller interface {
	// Identity returns the identity of the handler that is managed by this
	// controller.
	Identity() configkit.Identity

	// Type returns the name of the handler that is managed by this controller.
	Type() configkit.HandlerType

	// Tick instructs the controller to perform an implementation-defined
	// "tick".
	//
	// It returns the messages produced by the handler that need to be
	// dispatched by the engine.
	//
	// now is the current time, according to the engine, which may not match the
	// system time.
	Tick(
		ctx context.Context,
		obs fact.Observer,
		now time.Time,
	) ([]*envelope.Envelope, error)

	// Handle handles a message.
	//
	// It returns the messages produced by the handler that need to be
	// dispatched by the engine.
	//
	// now is the current time, according to the engine, which may not match the
	// system time.
	Handle(
		ctx context.Context,
		obs fact.Observer,
		now time.Time,
		env *envelope.Envelope,
	) ([]*envelope.Envelope, error)

	// Reset clears the state of the controller.
	Reset()
}

Controller orchestrates the handling of a message by Dogma message handler.

Directories

Path Synopsis
Package aggregate provides engine components that handle messages that are routed to aggregate message handlers.
Package aggregate provides engine components that handle messages that are routed to aggregate message handlers.
Package integration provides engine components that handle messages that are routed to integration message handlers.
Package integration provides engine components that handle messages that are routed to integration message handlers.
Package process provides engine components that handle messages that are routed to process message handlers.
Package process provides engine components that handle messages that are routed to process message handlers.
Package projection provides engine components that handle messages that are routed to projection message handlers.
Package projection provides engine components that handle messages that are routed to projection message handlers.

Jump to

Keyboard shortcuts

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