View Source Web3.Middleware.Pipeline (web3 v0.1.6)

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

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

Link to this section Summary

Functions

Puts the key with value equal to value into assigns map.

Puts the key with value equal to value into metadata map.

Executes the middleware chain.

Extract the request from the pipeline

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

Has the pipeline been halted?

Sets the response to be returned to the dispatch caller, unless already set.

Extract the response from the pipeline

Set request field

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

assign_metadata(pipeline, key, value)

View Source

Puts the key with value equal to value into metadata map.

Note: Use of atom keys in metadata is deprecated in favour of binary strings.

Link to this function

chain(pipeline, stage, middleware)

View Source

Executes the middleware chain.

Extract the request from the pipeline

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

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

Has the pipeline been halted?

Link to this function

respond(pipeline, response)

View Source

Sets the response to be returned to the dispatch caller, unless already set.

Extract the response from the pipeline

Link to this function

set_request(pipeline, request)

View Source

Set request field