Versions in this module Expand all Collapse all v0 v0.3.0 Sep 1, 2026 Changes in this version + func GetCompensation(effect effectus.Effect) string + func Run(program *Program, executor effectus.Executor) (interface{}, error) + func RunContext(ctx context.Context, program *Program, executor effectus.Executor) (interface{}, error) + type CompiledFlow struct + FactPaths []string + Name string + Predicates []*schema.Predicate + Priority int + Program *Program + SourceFile string + func (cf *CompiledFlow) GetPriority() int + type Compiler struct + func (c *Compiler) CompileFile(path string, schema effectus.SchemaInfo) (effectus.Spec, error) + func (c *Compiler) CompileFiles(paths []string, schema effectus.SchemaInfo) (effectus.Spec, error) + func (c *Compiler) CompileParsedFile(file *ast.File, path string, schema effectus.SchemaInfo) (effectus.Spec, error) + type Executor struct + func NewExecutor(verbRegistry common.VerbRegistry, options ...ExecutorOption) *Executor + func (fe *Executor) ExecuteProgram(ctx context.Context, flowName string, program *Program, facts common.Facts) (interface{}, error) + type ExecutorOption func(*Executor) + func WithCapabilitySystem(capSystem *capability.CapabilitySystem) ExecutorOption + func WithSaga(store schema.SagaStore) ExecutorOption + type Program struct + Continue func(interface{}) *Program + Effect effectus.Effect + Pure interface{} + Tag ProgramTag + Transaction *TransactionInfo + func Atomic(name string, program *Program) *Program + func Do(effect effectus.Effect, cont func(interface{}) *Program) *Program + func DoWithCompensation(effect effectus.Effect, compensation string, cont func(interface{}) *Program) *Program + func Error(err error) *Program + func FromList(effects []effectus.Effect) *Program + func FromListWithCompensation(effects []effectus.Effect, compensations map[string]string) *Program + func Pure(value interface{}) *Program + func Transaction(sagaID, name string, program *Program) *Program + func (p *Program) Bind(f func(interface{}) *Program) *Program + func (p *Program) FlatMap(f func(interface{}) *Program) *Program + func (p *Program) IsTransactional() bool + func (p *Program) Map(f func(interface{}) interface{}) *Program + func (p *Program) Then(next *Program) *Program + func (p *Program) ToAtomic(name string) *Program + func (p *Program) ToTransaction(sagaID, name string) *Program + func (p *Program) WithCompensation(getCompensation func(verb string) string) *Program + type ProgramTag int + const EffectProgramTag + const PureProgramTag + const TransactionProgramTag + type Spec struct + CapSystem *capability.CapabilitySystem + FactPaths []string + Flows []*CompiledFlow + Name string + SagaEnabled bool + SagaStore schema.SagaStore + VerbRegistry common.VerbRegistry + func (s *Spec) Execute(ctx context.Context, facts effectus.Facts, ex effectus.Executor) error + func (s *Spec) GetName() string + func (s *Spec) RequiredFacts() []string + type TransactionInfo struct + Compensation string + IsAtomic bool + Name string + Program *Program + SagaID string + func ExtractTransactions(program *Program) []*TransactionInfo