aggregate

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package aggregate provides engine components that handle messages that are routed to aggregate message handlers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

type Controller struct {
	Config     configkit.RichAggregate
	MessageIDs *envelope.MessageIDGenerator
	// contains filtered or unexported fields
}

Controller is an implementation of engine.Controller for dogma.AggregateMessageHandler implementations.

func (*Controller) Handle

func (c *Controller) Handle(
	_ context.Context,
	obs fact.Observer,
	now time.Time,
	env *envelope.Envelope,
) ([]*envelope.Envelope, error)

Handle handles a message.

func (*Controller) HandlerConfig

func (c *Controller) HandlerConfig() configkit.RichHandler

HandlerConfig returns the config of the handler that is managed by this controller.

func (*Controller) Reset

func (c *Controller) Reset()

Reset clears the state of the controller.

func (*Controller) Tick

Tick does nothing.

Jump to

Keyboard shortcuts

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