amqplib
amqplib copied to clipboard
Make channel APIs polymorphic
The two channel APIs have a few methods for which proper polymorphism would be convenient, e.g., for missing out the options argument in favour of the callback.
Dispatching on the types seems like a reasonable way to do this, since the callback is usually a function. Maybe a tiny multiple dispatch module? It doesn't need to be very clever, just to make a wee state machine for each method.