trigger

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package trigger defines sans-I/O policies and their immutable transitions.

Index

Constants

View Source
const HandoffBoundaryName = "handoff-participant-boundary"
View Source
const SourceWindowName = "memory-source-window"

Variables

This section is empty.

Functions

This section is empty.

Types

type HandoffBoundary

type HandoffBoundary struct {
	// contains filtered or unexported fields
}

func NewHandoffBoundary

func NewHandoffBoundary(position int64, activation handoff.Activate) (HandoffBoundary, error)

func (HandoffBoundary) Activation

func (b HandoffBoundary) Activation() handoff.Activate

func (HandoffBoundary) Position

func (b HandoffBoundary) Position() int64

type HandoffBoundaryPolicy

type HandoffBoundaryPolicy struct{}

func (HandoffBoundaryPolicy) Activate

func (HandoffBoundaryPolicy) InitialState

func (HandoffBoundaryPolicy) InitialState() source.Cursor

type Policy

type Policy[Signal, State, Action any] interface {
	InitialState() State
	Activate(Signal, State) Transition[State, Action]
}

Policy maps one signal and activation state to a pure transition.

type ProcessSourceWindow

type ProcessSourceWindow struct {
	// contains filtered or unexported fields
}

func (ProcessSourceWindow) After

func (w ProcessSourceWindow) After() int64

func (ProcessSourceWindow) Through

func (w ProcessSourceWindow) Through() int64

type SourceHighWatermark

type SourceHighWatermark struct {
	// contains filtered or unexported fields
}

func NewSourceHighWatermark

func NewSourceHighWatermark(sequence, limit int64) (SourceHighWatermark, error)

func (SourceHighWatermark) Limit

func (s SourceHighWatermark) Limit() int64

func (SourceHighWatermark) Sequence

func (s SourceHighWatermark) Sequence() int64

type SourceWindowPolicy

type SourceWindowPolicy struct{}

func (SourceWindowPolicy) Activate

func (SourceWindowPolicy) InitialState

func (SourceWindowPolicy) InitialState() source.Cursor

type Transition

type Transition[S, A any] struct {
	// contains filtered or unexported fields
}

Transition is the complete result of one pure Trigger activation.

func NewTransition

func NewTransition[S, A any](state S, actions ...A) Transition[S, A]

func (Transition[S, A]) Actions

func (t Transition[S, A]) Actions() []A

func (Transition[S, A]) State

func (t Transition[S, A]) State() S

Jump to

Keyboard shortcuts

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