Commanded v0.13.0 Commanded.Middleware.Pipeline View Source

Pipeline is a struct used as an argument in the callback functions of modules implementing the Commanded.Middleware behaviour.

This struct must be returned by each function to be used in the next middleware based on the configured middleware chain.

Pipeline fields

  • assigns - shared user data as a map
  • command - the command struct being dispatched
  • halted - the boolean status on whether the pipeline was halted
  • response - override the response to send back to the caller (optional)

Link to this section Summary

Functions

Puts the key with value equal to value into assigns map

Executes the middleware chain

Halts the pipeline by preventing further middleware downstream from being invoked

Sets the response to be returned to the dispatch caller

Link to this section Functions

Link to this function assign(pipeline, key, value) View Source

Puts the key with value equal to value into assigns map

Link to this function chain(pipeline, stage, middleware) View Source

Executes the middleware chain

Halts the pipeline by preventing further middleware downstream from being invoked.

Prevents dispatch of the command if halt occurs in a before_dispatch callback.

Link to this function respond(pipeline, response) View Source

Sets the response to be returned to the dispatch caller