* MF-166 - Add lora-adapter service (#416)
* MF-166 - Add lora-adapter service
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix NATS connexion and use credentials with gRPC
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Forward lora msgs to nats
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Add make cmd and docker-compose
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Define lora conf as private
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Rename funcs fix nats conn
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Update README and fix reviews
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Rm NATS sub
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* MF-166 - Add lora-adapter service (#461)
* MF-166 - Add lora-adapter service
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix NATS connexion and use credentials with gRPC
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Forward lora msgs to nats
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Add make cmd and docker-compose
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Define lora conf as private
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Rename funcs fix nats conn
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Update README and fix reviews
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Rm NATS sub
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix lora server topic and logs
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix HTTP port
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* NOISSUE - Add event sourcing client to LoRa adapter (#471)
* Add event sourcing client to LoRa adapter
Signed-off-by: Aleksandar Novaković <anovakovic01@gmail.com>
* Update redis version in docker compose and update env vars
Signed-off-by: Aleksandar Novaković <anovakovic01@gmail.com>
* Add ES subscription to main LoRa function
Signed-off-by: Aleksandar Novaković <anovakovic01@gmail.com>
* Add new env vars to readme file of LoRa adapter
Signed-off-by: Aleksandar Novaković <anovakovic01@gmail.com>
* Add message acknowledgement to LoRa adapter
Signed-off-by: Aleksandar Novaković <anovakovic01@gmail.com>
* Add handling of empty values to event sourcing client (#474)
Signed-off-by: Aleksandar Novaković <anovakovic01@gmail.com>
* Add routemap and handle event sourcing
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix eventStore decoding
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Mv docker-compose in docker/addons
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix routemap and logs
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix reviews
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix reviews
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Update Gopkg.toml
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix reviews
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix route map and typos
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Update README
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix reviews
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix reviews
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix reviews
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix reviews
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix empty protobuf values
Update Normalizer service and .proto files. Reader and Writer services
needs to be updated due to message format change.
Signed-off-by: Dusan Borovcanin <dusan.borovcanin@mainflux.com>
* Update HTTP adapter to use gogo protobuf
Signed-off-by: Dusan Borovcanin <dusan.borovcanin@mainflux.com>
* Update Reader services API
Update API or Reader services to match Message changes due to switching to gogo/proto.
Signed-off-by: Dusan Borovcanin <dusan.borovcanin@mainflux.com>
* Update InfluxDB services
Update InfluxDB Reader and Writer services to match new Message format.
Signed-off-by: Dusan Borovcanin <dusan.borovcanin@mainflux.com>
* Update MongoDB services
Update MongoDB Reader and Writer services to match new message format.
Signed-off-by: Dusan Borovcanin <dusan.borovcanin@mainflux.com>
* Update Cassandra services
Update Cassandra Reader and Writer service to match new Message format.
Signed-off-by: Dusan Borovcanin <dusan.borovcanin@mainflux.com>
* Fix InfluxDB Reader test
Signed-off-by: Dusan Borovcanin <dusan.borovcanin@mainflux.com>
* Update Makefile and docs accordingly
Signed-off-by: Dusan Borovcanin <dusan.borovcanin@mainflux.com>
* Fix possible data race in InfluxDB writer
Signed-off-by: Dusan Borovcanin <dusan.borovcanin@mainflux.com>
* Update InfluxDB Writer tests
Raise test coverage.
Signed-off-by: Dusan Borovcanin <dusan.borovcanin@mainflux.com>
* Fix InfluxDB reader
Fix wrong ValueSum readings. Upadete tests and raise coverage.
Signed-off-by: Dusan Borovcanin <dusan.borovcanin@mainflux.com>
* Update MongoDB services tests
Raise test coverage for MongoDB Reader and Writer services.
Signed-off-by: Dusan Borovcanin <dusan.borovcanin@mainflux.com>
* Update Readers API tests
Raise test coverage.
Signed-off-by: Dusan Borovcanin <dusan.borovcanin@mainflux.com>
* Raise test coverage
Update Cassandra Reader and Writer services tests.
Signed-off-by: Dusan Borovcanin <dusan.borovcanin@mainflux.com>
* Use gogo/protobuf in CoAP adapter
Add gogo/protobuf to Gopkg.toml and update dependencies.
Update Dockerfile to run `make proto`.
Signed-off-by: Dusan Borovcanin <dusan.borovcanin@mainflux.com>
* Update Cassandra Reader tests
Signed-off-by: Dusan Borovcanin <dusan.borovcanin@mainflux.com>
* Refactor code
Improve code style and comments to improve readability.
Signed-off-by: Dusan Borovcanin <dusan.borovcanin@mainflux.com>
* Rename Sum to SumValue
Signed-off-by: Dusan Borovcanin <dusan.borovcanin@mainflux.com>
* Rename Values to Value
Since message contains only single value (or possibly no value at all),
`Values` name could be misleading. Rename simple double value from
`Value` to `FloatValue` accordingly.
Signed-off-by: Dusan Borovcanin <dusan.borovcanin@mainflux.com>
* Fix InfluxDB Reader logging
Signed-off-by: Dusan Borovcanin <dusan.borovcanin@mainflux.com>
* Replace exclusive if statements with switch-case
Signed-off-by: Dusan Borovcanin <dusan.borovcanin@mainflux.com>
* Update Cassandra services tests
Signed-off-by: Dusan Borovcanin <dusan.borovcanin@mainflux.com>
* Bring old CoAP code back
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Fix channel ID formatting due to type change
Uncomment error handling for authorization.
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Update CoAP adapter docs
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Add copyright headers
Signed-off-by: Dusan Borovcanin <dusan.borovcanin@mainflux.com>
* Remove redundant type declaration
Signed-off-by: Dusan Borovcanin <dusan.borovcanin@mainflux.com>
* Add CoAP adapter to the list of services
Add CoAp adapter in Makefile services list and fix corresponding documentation.
Signed-off-by: Dusan Borovcanin <dusan.borovcanin@mainflux.com>
* Refactor CoAP code
Merge multipe `const` block int single and declare consts before vars.
Un-export notFound handler since there is no need to export it.
Signed-off-by: Dusan Borovcanin <dusan.borovcanin@mainflux.com>
* Update http version endpoint
This separates CoAP and HTTP APIs.
Signed-off-by: Dusan Borovcanin <dusan.borovcanin@mainflux.com>
* Refactor CoAP POST method handling
This PR is a part of CoAP adapter refactoring that will simplify adapter implementation.
Signed-off-by: Dusan Borovcanin <dusan.borovcanin@mainflux.com>
* Refactor CoAP adapter
Change CoAP message handling to simplify adapter implementation.
Signed-off-by: Dusan Borovcanin <dusan.borovcanin@mainflux.com>
* Add backoff timeout for server ping to client
Update CoAP adapter to provide subset of necessary features from
protocol specification.
Signed-off-by: Dusan Borovcanin <dusan.borovcanin@mainflux.com>
* Fix leaking locked goroutine
In case of the stopped ticker, its channel is NOT closed, so pinging might be left stuck waiting for the stopped ticker to send a notification.
Signed-off-by: Dusan Borovcanin <dusan.borovcanin@mainflux.com>
* Format code
Use more meaningful name for Handlers map.
Signed-off-by: Dusan Borovcanin <dusan.borovcanin@mainflux.com>
* Use and stop ticker from the same goroutine
Stop handler Ticker from ping goroutine rather than the cancel goroutine.
Signed-off-by: Dusan Borovcanin <dusan.borovcanin@mainflux.com>
* Check if subscription already exists in put method
Fix potential leak of handlers providing check inside of put method.
Signed-off-by: Dusan Borovcanin <dusan.borovcanin@mainflux.com>
* Use MessageID as Observe option
Since MessageID satisfies observe option behaviour, use Message ID
instead of local timestamp. Remove Thicker from handler and use it on
transport layer.
Signed-off-by: Dusan Borovcanin <dusan.borovcanin@mainflux.com>
* Use name Observer insted of Handler
Name `Observer` is used in protocol specification, so this naming makes
code more self-documenting.
Signed-off-by: Dusan Borovcanin <dusan.borovcanin@mainflux.com>
* Add CoAP adapter to docker-compose.yml
Signed-off-by: Dusan Borovcanin <dusan.borovcanin@mainflux.com>
* Add copyright headers
Signed-off-by: Dusan Borovcanin <dusan.borovcanin@mainflux.com>
* Remove unused constants
Fix service name in startup log message.
Signed-off-by: Dusan Borovcanin <dusan.borovcanin@mainflux.com>
* Add metrics endpoint
Signed-off-by: Dusan Borovcanin <dusan.borovcanin@mainflux.com>
* Refactor code
Config fields from main.go should not be exported; minor style changes.
Signed-off-by: Dusan Borovcanin <dusan.borovcanin@mainflux.com>
* Update authorization URI-Query option
Use `authorization` value in URI-Query option instead of `key`. This
mimics Authorization header in some other protocols (e.g. HTTP). Please
note that this value can be replaced with simple `auth` to save space,
due to constrained URI-Query option size.
Signed-off-by: Dusan Borovcanin <dusan.borovcanin@mainflux.com>
* Add development Docker images build
Add Dockerfile.dev and target in the Makefile to provide much faster image
building for `development purposes`.
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Build single service in dev mode
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Update docs
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Fix Makefile
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Fix dev-guide
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Fixes#337
Signed-off-by: Jovan Kostovski <chombium@gmail.com>
* added create table if not exists
Signed-off-by: Jovan Kostovski <chombium@gmail.com>
* added test target in sync with Semaphore CI
Signed-off-by: Jovan Kostovski <chombium@gmail.com>
* added warning about the possible data loss
Signed-off-by: Jovan Kostovski <chombium@gmail.com>
* Add InfluxDB reader
Summary:
- Add basic reader features
- Update Makefile
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Raise test coverage
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Update README.md and docker composition
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Fix docker-compose.yml
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Remove exposed ports
Ports are already exposed by mapping, so no need to explicity expose them.
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Add compiled .proto files
Signed-off-by: Sava Radoš <sava.rados@mainflux.com>
* Remove proto as prerequisite for build services target
Signed-off-by: Sava Radoš <sava.rados@mainflux.com>
* Add mongodb reader service
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Add tests for mongodb reader service
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Add documentation for mongodb reader service
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Fix test function name
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Update comment in docker-compose for mongodb-reader service
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Fix logger message in http service
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Inline query and error handling in cassandra writer
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Fix comments and import statement in writer interface
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Add reader common interface and shared HTTP API
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Add Cassandra reader implementation
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Add tests for cassandra reader
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Add swagger doc and readme for readers
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Update make file
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Add docker-compose configuration for cassandra reader
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Add readme file to cassandra reader
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Add Cassandra writer implementation
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Add cassandra service with version and metrics endpoints
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Add test for cassandra writer
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Exclude api.go files from code coverage
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Add readme file for cassandra writer
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Add docker compose configuration for cassandra writer
Add README file. Add docker compose configuration.
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Add gocql as project dependency
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Fix init script for cassandra in docker-compose
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Add testifies require subpackage
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
New targets will allow Makefile to be used as primary option for
releasing docker containers, both as 'latest' and versioned.
Signed-off-by: Dejan Mijic <dejan@mainflux.com>