Closed xorduna closed 2 years ago
@xorduna Hi, how about git clone the repository instead of using go get
, because now gmqtt is intended to be used as an application rather than a library.
However, if you want to import gmqtt as a library, go get github.com/DrmagicE/gmqtt@v0.4.1
should work, but you may take a look into the cmd
folder to learn how to build a gmqtt server.
FYI:
The
examples
folder is outdated. It is recommended to use the gmqtt as an application and leverage the plugin system to custom and extend the capabilities if required, rather than import it as a building block for your own binary.Using gmqtt as a go package is possible but required additional knowledge about the codebase which may bring you troubles. https://github.com/DrmagicE/gmqtt/pull/143#issue-1048738705
Hi @DrmagicE!
First of all, thank you so much for such quick answer! The main reason to use it as a library was to do the development of our plugin in the same repo as the main application.
What I am worried about doing a git clone is how we keep the track of the original project while having our own plugins implemented in their own repo.
In any case we will explore options from there.
Thanks!
Xavi
I have created some gmqtt
plugins before. it seems that there is no any graceful way to develop a brand new plugin without the main binary. But we can develop our own plugins on a forked repo and test it in the main binary. The only way to keep the track of the origin repo is use a new remote url and merge from the new remote repeatedly :
e.g: remote named github
git remote set-url github git@github.com:DrmagicE/gmqtt.git
when forked the repo.git pull github master
btw, it will be cool to keep the binary
separate from library
.
Hi!
We would like to use gmqtt as our mqtt broker with some plugins to integrate it with our existing application.
We have seen that if we do "go get github.com/DrmagicE/gmqtt" only the folder pkg is imported. We have seen this command in v0.1.1.
How would you recommend to integrate gmqtt into an existing project as a library?
Thank you very much!
Xavi