Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InvokeContext ¶
func InvokeContext(ctx context.Context, executor ContextExecutor, effect Effect) (interface{}, error)
InvokeContext executes an effect using an executor that only implements the context-aware contract. It does not require the deprecated Executor.Do method.
Types ¶
type Compiler ¶
type Compiler interface {
// CompileFile compiles a rule file to a Spec
CompileFile(path string, schema SchemaInfo) (Spec, error)
}
Compiler is the interface implemented by both list and flow compilers
type ContextExecutor ¶
type ContextExecutor interface {
DoContext(ctx context.Context, effect Effect) (result interface{}, err error)
}
ContextExecutor executes effects with cancellation and deadline propagation.
type Effect ¶
type Effect struct {
Verb string
Payload interface{}
}
Effect represents a verb and its payload
type Executor ¶
type Executor interface {
// Do executes an effect without cancellation support.
// Deprecated: production executors should also implement ContextExecutor.
Do(effect Effect) (result interface{}, err error)
}
Executor handles execution of effects
type Facts ¶
type Facts interface {
// Get returns the value at the given path, or nil if not found
Get(path string) (interface{}, bool)
// Schema returns schema information about the facts
Schema() SchemaInfo
}
Facts represents the structured input data for rules
type SchemaInfo ¶
type SchemaInfo interface {
// ValidatePath checks if a path is valid according to the schema
ValidatePath(path string) bool
}
SchemaInfo provides metadata about the fact schema
type Spec ¶
type Spec interface {
// Name returns the name of the spec
GetName() string
// RequiredFacts returns the list of fact paths required by this spec
RequiredFacts() []string
// Execute runs the specification with the given facts and executor
Execute(ctx context.Context, facts Facts, ex Executor) error
}
Spec is the interface implemented by both list.Spec and flow.Spec
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
effectusc
command
|
|
|
effectusd
command
cmd/effectusd/main.go
|
cmd/effectusd/main.go |
|
test
command
|
|
|
Package common provides shared execution interfaces and utilities
|
Package common provides shared execution interfaces and utilities |
|
Package embedded provides a small checked-runtime facade for Go applications.
|
Package embedded provides a small checked-runtime facade for Go applications. |
|
Package executorhttp adapts an Effectus HTTP verb target to a Go handler.
|
Package executorhttp adapts an Effectus HTTP verb target to a Go handler. |
|
flow/executor.go
|
flow/executor.go |
|
gen
|
|
|
internal
|
|
|
Package invocation defines metadata that must cross every external effect boundary.
|
Package invocation defines metadata that must cross every external effect boundary. |
|
Package ir defines Effectus's callback-free, checked execution representation.
|
Package ir defines Effectus's callback-free, checked execution representation. |
|
list/executor.go
|
list/executor.go |
|
Package schema provides saga transaction management with capability-based locking
|
Package schema provides saga transaction management with capability-based locking |
|
expression
Package expression defines the narrow contracts used by expression clients.
|
Package expression defines the narrow contracts used by expression clients. |
|
fencing
Package fencing defines resource leases that issue fencing tokens.
|
Package fencing defines resource leases that issue fencing tokens. |
|
ledger
Package ledger defines durable execution admission and recovery contracts without database or queue implementations.
|
Package ledger defines durable execution admission and recovery contracts without database or queue implementations. |
|
types
Package types provides the unified type system for Effectus
|
Package types provides the unified type system for Effectus |
|
verb
Package verb provides definitions and utilities for effect verbs
|
Package verb provides definitions and utilities for effect verbs |
|
workflow
Package workflow defines durable saga and outbox contracts without storage implementations.
|
Package workflow defines durable saga and outbox contracts without storage implementations. |
|
unified/bundle.go
|
unified/bundle.go |
Click to show internal directories.
Click to hide internal directories.
