Documentation ¶
Overview ¶
Package projection provides engine components that handle messages that are routed to projection message handlers.
Index ¶
- type Controller
- func (c *Controller) Handle(ctx context.Context, obs fact.Observer, _ time.Time, env *envelope.Envelope) ([]*envelope.Envelope, error)
- func (c *Controller) Name() string
- func (c *Controller) Reset()
- func (c *Controller) Tick(context.Context, fact.Observer, time.Time) ([]*envelope.Envelope, error)
- func (c *Controller) Type() handler.Type
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 is an implementation of engine.Controller for dogma.ProjectionMessageHandler implementations.
func NewController ¶
func NewController( n string, h dogma.ProjectionMessageHandler, ) *Controller
NewController returns a new controller for the given handler.
func (*Controller) Handle ¶
func (c *Controller) Handle( ctx context.Context, obs fact.Observer, _ time.Time, env *envelope.Envelope, ) ([]*envelope.Envelope, error)
Handle handles a message.
func (*Controller) Name ¶
func (c *Controller) Name() string
Name returns the name of the handler that is managed by this controller.
func (*Controller) Tick ¶
func (c *Controller) Tick( context.Context, fact.Observer, time.Time, ) ([]*envelope.Envelope, error)
Tick does nothing.
func (*Controller) Type ¶
func (c *Controller) Type() handler.Type
Type returns handler.ProjectionType.
Click to show internal directories.
Click to hide internal directories.