gobot icon indicating copy to clipboard operation
gobot copied to clipboard

Should mqtt Adaptor provide access to underline paho.Client instance?

Open andrewebdev opened this issue 5 years ago • 1 comments

So I've seen A couple of instances where people are asking for functionality in mqtt.Adaptor that the paho.Client already provides.

I suspect gobot it attempting to wrap some of the tedious interfaces to make it easier to work with the paho library. I also find that I need access to something that paho.Client already provides ( paho.Client.IsConnected() in my case). It feels a bit cumbersome to have to create wrappers for every method or field that we may want to have access to.

Can we possibly make the mqtt.Adaptor.client field public?

This would give us the opportunity to drop down to a lower level if we need to go deeper into the internals, rather than having to create pull requests just for a simple wrapper.

PS: I can contribute a PR to this if this is something useful and if gobot team agrees.

andrewebdev avatar Jul 13 '19 22:07 andrewebdev

I think this is an excellent idea. Yes, please.

deadprogram avatar Jul 14 '19 22:07 deadprogram