The zaqar.common.pipeline
module¶
This module implements a common Pipeline object.
The pipeline can be used to enhance the storage layer with filtering, routing, multiplexing and the like. For example:
>>> stages = [MessageFilter(), EncryptionFilter(), QueueController()]
>>> pipeline = Pipeline(stages)
Every stage has to implement the method it wants to hook into. This method will be called when the pipeline consumption gets to that point - stage ordering matters - and will continue unless the method call returns a value that is not None.
At least one of the stages has to implement the calling method. If none of them do, an AttributeError exception will be raised.