Documentation
¶
Overview ¶
Package projection provides engine components that handle messages that are routed to projection message handlers.
Index ¶
- Constants
- type Controller
- func (c *Controller) Handle(ctx context.Context, obs fact.Observer, _ time.Time, env *envelope.Envelope) ([]*envelope.Envelope, error)
- func (c *Controller) Identity() configkit.Identity
- func (c *Controller) Reset()
- func (c *Controller) Tick(ctx context.Context, obs fact.Observer, now time.Time) ([]*envelope.Envelope, error)
- func (c *Controller) Type() configkit.HandlerType
Constants ¶
View Source
const CompactInterval = 1 * time.Hour
CompactInterval is how frequently projections should be compacted.
This interval respects the current engine time, which may not be the same as the "real world" time. See engine.RunTimeScaled().
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Controller ¶
type Controller struct {
Config configkit.RichProjection
CompactDuringHandling bool
// contains filtered or unexported fields
}
Controller is an implementation of engine.Controller for dogma.ProjectionMessageHandler implementations.
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) Identity ¶ added in v0.3.0
func (c *Controller) Identity() configkit.Identity
Identity returns the identity of the handler that is managed by this controller.
func (*Controller) Tick ¶
func (c *Controller) Tick( ctx context.Context, obs fact.Observer, now time.Time, ) ([]*envelope.Envelope, error)
Tick always performs projection compaction.
func (*Controller) Type ¶
func (c *Controller) Type() configkit.HandlerType
Type returns configkit.ProjectionHandlerType.
Click to show internal directories.
Click to hide internal directories.