peake100 / rogerRabbit-go

wrapper & drop-in replacement for streadway/ampq with automatic reconnects
MIT License
25 stars 3 forks source link

Feature: Allow Registration of MiddlewareProviderFactory functions #28

Closed peake100 closed 3 years ago

peake100 commented 3 years ago

When implementing types whose methods implement multiple middlewares, it would be useful to have MiddlewareProvider factory functions we could register on the DialConfig (For instance ProvidesPublish which would implement a Channel.Publish middleware as a method) that could be called to generate a new provider than type assert to find and apply it's middleware methods.

This would significantly increase caller usability for, say, a logger middleware provider ala #19 which will need to implement all middlewares and be vary tedious to register on the configuration value.

peake100 commented 3 years ago

Closed by #30