* 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>
* Add version endpoint to MQTT adapter
Expose CoAP version endpoint in the default docker-compose.
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Use /tcp insted of implicit protocol name
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Add content type to MQTT sub topic
Signed-off-by: Aleksandar Novakovic <anovakovic01@gmail.com>
* Remove default content type value
Remove default content type value (SenML JSON) and replace it with
an empty string.
Signed-off-by: Aleksandar Novakovic <anovakovic01@gmail.com>
* Update docs in accordance with changes
Signed-off-by: Aleksandar Novakovic <anovakovic01@gmail.com>
* Add format to raw message and content type mapping
Signed-off-by: Aleksandar Novakovic <anovakovic01@gmail.com>
* Add format as part of content type header
Signed-off-by: Aleksandar Novakovic <anovakovic01@gmail.com>
* Add format to content-type header for WS adapter
Add format as part of content-type and add support for
content-type header and query parameter.
Signed-off-by: Aleksandar Novakovic <anovakovic01@gmail.com>
* Add support for format and content-type in MQTT adapter
Signed-off-by: Aleksandar Novakovic <anovakovic01@gmail.com>
* Add format and content-type to CoAP adapter
Signed-off-by: Aleksandar Novakovic <anovakovic01@gmail.com>
* Add documentation for content type and format
Signed-off-by: Aleksandar Novakovic <anovakovic01@gmail.com>
* Add comments to MQTT code
Signed-off-by: Aleksandar Novakovic <anovakovic01@gmail.com>
* Fix SenML JSON CoAP code type
Signed-off-by: Aleksandar Novakovic <anovakovic01@gmail.com>
* Remove format from the adapters
Signed-off-by: Aleksandar Novakovic <anovakovic01@gmail.com>
* Remove format from the docs
Signed-off-by: Aleksandar Novakovic <anovakovic01@gmail.com>
* Remove format field from MQTT adapter
Signed-off-by: Aleksandar Novakovic <anovakovic01@gmail.com>
* Update content type to be optional
Signed-off-by: Aleksandar Novakovic <anovakovic01@gmail.com>
* Add support for CBOR content type in the normalizer
Signed-off-by: Aleksandar Novakovic <anovakovic01@gmail.com>
* Update docs for MQTT content type
Signed-off-by: Aleksandar Novakovic <anovakovic01@gmail.com>
* Add arm Dockerfiles
Change version of postgres images in docker-compose to use versions with multiarch
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* docker compose file
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* remove bin qemu file
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* remove unnecesarry comments
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* Add make dockers_arm32v7 in Makefile
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* Remove docker/Dockerfile.arm
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* Add build for arm32v7 in ui Makefile
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* Add arm32v7 tags
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* add docker-compose for arm
remove thing-db in docker compose (use same db as user)
fix dockerfile and makefile
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* fix thing database env variable
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* Switch back to separate database for things and users
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* rename arm32v7 to arm
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* remove arm32v7 tag
rename arm32v7 image names
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* Rename command for making mqtt and ui individual images, to match other miscroservices
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* Push arm docker images
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* fix fucntion call in ci.sh
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* mergiing ui/Dockerfile
Signed-off-by: Ivan Milošević <iva@blokovi.com>