feat(dispatch): implement Middleware base and pipeline executor #338
No reviewers
Labels
No labels
Blocked
Duplicate
MoSCoW/Could Have
MoSCoW/Must Have
MoSCoW/Should Have
Points/1
Points/13
Points/2
Points/21
Points/3
Points/5
Points/8
Priority/Backlog
Priority/Critical
Priority/High
Priority/Low
Priority/Medium
State/Completed
State/In progress
State/In review
State/Paused
State/Unverified
State/Verified
State/Wont Do
Type/Bug
Type/Epic
Type/Feature
Type/Legendary
Type/Task
Type/Testing
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Blocks
Reference: aethyr/Aethyr#338
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feature/m1-middleware-pipeline"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Middlewarebase class (lib/aethyr/core/commands/middleware.rb) with priority ordering (default 500), phase designation (:before_action/:after_action),call(action, context)interface, and class-levelregistermethodMiddlewarePipelineexecutor (lib/aethyr/core/commands/middleware_pipeline.rb) with Mutex-protected registry, priority-sorted before/after phases, andthrow(:halt)chain interruption mechanismCloses #105
Implementation Details
snapshot_middlewareextracts before/after lists under the lock, then execution proceeds without holding the lockVALID_PHASESis frozen; priority and phase are set at construction time# typed: strictwith fullsigannotations43b7997e5dto00137d6e3d00137d6e3dtob71a2d7348b71a2d7348toc227b71c3bc227b71c3btobfc3984dc9