* Add health check
Signed-off-by: Ivan Milosevic <iva@blokovi.com>
* update readme
use constants
Signed-off-by: Ivan Milosevic <iva@blokovi.com>
* close body after each HEAD request
Signed-off-by: Ivan Milosevic <iva@blokovi.com>
* log and close health check response body
Signed-off-by: Ivan Milosevic <iva@blokovi.com>
* use healthcheck endpoint instead ping for docker healthcheck
Signed-off-by: Ivan Milosevic <iva@blokovi.com>
* remove for loop, only one check and exit if failed healthcheck
Signed-off-by: Ivan Milosevic <iva@blokovi.com>
* changed cmd for healthcheck
new version of verne image
Signed-off-by: Ivan Milosevic <iva@blokovi.com>
* use false instead exit 1
Signed-off-by: Ivan Milosevic <iva@blokovi.com>
* return for loop
Signed-off-by: Ivan Milosevic <iva@blokovi.com>
* review
Signed-off-by: Ivan Milosevic <iva@blokovi.com>
* add continue after unsuccesful http.get
Signed-off-by: Ivan Milosevic <iva@blokovi.com>
* Use backoff package
Signed-off-by: Ivan Milosevic <iva@blokovi.com>
* extracting healtcheck function outside main()
Signed-off-by: Ivan Milosevic <iva@blokovi.com>
* go mod vendor
Signed-off-by: Ivan Milosevic <iva@blokovi.com>
* go mod tidy
Signed-off-by: Ivan Milosevic <iva@blokovi.com>
* go mod vendor
Signed-off-by: Ivan Milosevic <iva@blokovi.com>
* Add MQTT forwarder
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Cleanup forwarder code
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Use MQTT Publisher in MQTT forwarder
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Cleanup MQTT messaging
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Add Paho client timeout errors
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Simplify MQTT fowarder
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Fix naming in main method
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Use interface and struct instead of function
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Use Mainflux errors package
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Rename `tkn` to `token`
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Use "/" instead of "." as topic separator
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Use async MQTT Publisher
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Fix timeout errors messages
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Add connect token check
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Rename package alias
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* NOISSUE - Fix default nats publisher subject
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Use created timestamp inn transformer
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Use created timestamp in transformer
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* rename topic -> subject for nats
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* revert
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* revert
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix subscriber topic
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix timestamp
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Use int64 nanoseconds Created timestamp
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Typo
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Add comment to created protobuf field
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Rm gogo from scripts/ci.sh
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix comment
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Return publisher in NewPublisher
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Refactor messaging
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Rename SubscribeHandler to MessageHandler
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Remove `Auth` event logs
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Update message pubsub APi
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Fix topics handling
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Update CoAP adapter
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Update Twins service
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Update LoRa adapter
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Update OPC UA adapter
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Remove broker package
Package `broker` is conceptually renamed to package `nats`.
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Update makefile
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Add comment explanation
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Fix MQTT adapter
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Fix typo
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Move NATS pub/sub implementation to pubsub pkg
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Remove an empty line in main methods
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Move messaging-related code to messaging package
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Fix Twins mocks
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Change Occurred back to Created
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Fix tranformer test
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Fix message proto commands
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Replace string literal with constant
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Remove alias from main method
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Change messaging pubsub alias
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Rename occured to created
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Handle NATS connection in the NATS PubSub
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Rename n to pub/pubSub
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Fix typos
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Use Events interface in MQTT adapter
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Switch to the new version of mProxy
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Update vendor
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Update mProxy version
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* MF-1078 - Add reception time to published messages and use it if SenML time is missing
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix comments
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Add message timestamp
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix pub
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Mv timestamp to service layer
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Revert WS
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix coap
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix CI bot
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Rename Timestamp Created
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Mv Created field to message creation
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Mv Created field to message creation
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Use UnixNano
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Use google.protobuf.Timestamp
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Add protoc-gen-gogo and gogoproto to CI script
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Use TimestampProto to generate timestamp
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* NOISSUEE - Create broker package for NATS
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Create funcs to return NATS connection
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* mv os.exit to main
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix Reviews
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix tests and typos
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix CI
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix reviews
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Unify Publisher and Subscriber interfaces
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Rename Nats interface
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* typo
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Mv message.pb.go, messsage.proto and topics.go to broker directory
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix go.mod
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Use mainflux broker for writers and twins services
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix go.mod
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix twins tests
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix make proto
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix message.proto
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix golangcibot
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* regenerate message.pb.go
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix comment
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix comment
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix make proto
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Add NATS errors
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Add publisher field to the message
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Update SenML lib
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Add disconnect event to mProxy
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Rename publishers to pubs
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Use acync publishers
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Switch to grpcbox
Use grpcbox as a gRPC client library, because
it is much better maintained.
Shows good performance and generation of protobuf
files is simple and automatic.
Signed-off-by: Drasko DRASKOVIC <drasko.draskovic@gmail.com>
* Fix typo
Signed-off-by: Drasko DRASKOVIC <drasko.draskovic@gmail.com>
* Add ES flat to the things service
Signed-off-by: Aleksandar Novakovic <anovakovic01@gmail.com>
* Add env var for optional ES
Signed-off-by: Aleksandar Novakovic <anovakovic01@gmail.com>
* Change CanAccess to CanAccessByKey for things
Signed-off-by: Nick Neisen <nwneisen@gmail.com>
* Change CanAccess in remaining occurances
Signed-off-by: Nick Neisen <nwneisen@gmail.com>
* Regenerate generated files
Signed-off-by: Nick Neisen <nwneisen@gmail.com>
* Generate pb.go files with protoc 3.6.1
Signed-off-by: Nick Neisen <nwneisen@gmail.com>