Documentation
¶
Overview ¶
list/executor.go
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CompiledRule ¶
type CompiledRule struct {
Name string
Priority int
Predicates []*schema.Predicate
Effects []*Effect
FactPaths []string
}
CompiledRule represents a rule after compilation
func (*CompiledRule) GetPriority ¶
func (cr *CompiledRule) GetPriority() int
GetPriority implements the common.Prioritized interface
type Compiler ¶
type Compiler struct{}
Compiler implements the Compiler interface for list-style rules
func (*Compiler) CompileFile ¶
CompileFile compiles a rule file into a list-style spec
type Effect ¶
type Effect struct {
Verb string // Name of the verb
Args map[string]interface{} // Arguments to the verb
}
Effect represents a verb to be executed along with its arguments This will be phased out in favor of effectus.Effect
type Executor ¶
type Executor struct {
// contains filtered or unexported fields
}
Executor is the main executor for list rules with saga and capability support
func NewExecutor ¶
func NewExecutor(verbRegistry common.VerbRegistry, options ...ExecutorOption) *Executor
NewExecutor creates a new executor for list rules
type ExecutorOption ¶
type ExecutorOption func(*Executor)
ExecutorOption defines an option for configuring the executor
func WithCapabilitySystem ¶
func WithCapabilitySystem(capSystem *capability.CapabilitySystem) ExecutorOption
WithCapabilitySystem enables capability-based locking
func WithSaga ¶
func WithSaga(store schema.SagaStore) ExecutorOption
WithSaga enables saga-style compensation for failed executions
type Spec ¶
type Spec struct {
Rules []*CompiledRule
FactPaths []string
Name string
SagaEnabled bool // Whether to use saga execution
SagaStore schema.SagaStore // Saga store for transaction management
CapSystem *capability.CapabilitySystem // Capability system for locking
VerbRegistry common.VerbRegistry // Verb registry for execution
}
Spec implements the effectus.Spec interface for list rules
func (*Spec) RequiredFacts ¶
RequiredFacts returns the list of fact paths required by this spec