Documentation
¶
Index ¶
- type Engine
- func (r *Engine) CleanupExpiredPlans(ctx context.Context) (deletedCount int64, returnErr error)
- func (r *Engine) Execute(ctx context.Context, request action.Request) (_ action.Result, returnErr error)
- func (r *Engine) Preview(ctx context.Context, request action.Request) (preview action.Preview, returnErr error)
- type Options
- type Registry
- func (registry *Registry) BindPrepared(moduleID string, prepared action.PreparedDescriptor, handler action.Handler) error
- func (registry *Registry) List() []action.CatalogEntry
- func (registry *Registry) Register(moduleID string, descriptor action.Descriptor, handler action.Handler) error
- func (registry *Registry) Reset(ctx context.Context) error
- func (registry *Registry) Resolve(id string) (action.CatalogEntry, bool)
- func (registry *Registry) Revoke() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
Engine is the internal governed execution boundary for registered Actions. It applies validation, authorization, Preview binding, idempotency, transactions, and audit semantics independently of the calling channel.
func New ¶
New validates its dependencies and constructs a Runtime for trusted framework assembly without executing an Action.
func (*Engine) CleanupExpiredPlans ¶
CleanupExpiredPlans removes expired Preview plans while holding a Runtime lease.
type Options ¶
type Options struct {
Authorizer authz.Authorizer
Audit audit.Hook
Plans actionpersistence.PlanStore
Idempotency actionpersistence.IdempotencyStore
Transactions runtimecontrol.TransactionManager
Clock func() time.Time
PlanTTL time.Duration
AuditTimeout time.Duration
AuditFailure func(context.Context, error, audit.Event)
}
Options supplies the required governance services and optional timing policy used by a Runtime. Zero durations select conservative defaults.
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
Registry owns mutable Handler bindings exclusively inside framework assembly. Callers outside this internal package cannot construct or mutate it.
func NewRegistry ¶
func NewRegistry() *Registry
NewRegistry constructs an empty internal Action registry.
func (*Registry) BindPrepared ¶
func (registry *Registry) BindPrepared(moduleID string, prepared action.PreparedDescriptor, handler action.Handler) error
BindPrepared attaches runtime behavior to an already compiled contract.
func (*Registry) List ¶
func (registry *Registry) List() []action.CatalogEntry
List returns deterministic defensive read-only catalog entries.
func (*Registry) Register ¶
func (registry *Registry) Register(moduleID string, descriptor action.Descriptor, handler action.Handler) error
Register validates and binds one Action descriptor and Handler.