|
|
@ -9,6 +9,8 @@ Learning MQTT with Golang by doing. This repo is a simple example of using a Gol
|
|
|
|
|
|
|
|
|
|
|
|
![mqtt-arch](./img/mqtt-architecture.svg)
|
|
|
|
![mqtt-arch](./img/mqtt-architecture.svg)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Ideally I would like this application to resemble the above design. Conceptually, there
|
|
|
|
|
|
|
|
|
|
|
|
## Development
|
|
|
|
## Development
|
|
|
|
|
|
|
|
|
|
|
|
For local development we use [Mosquitto](https://mosquitto.org/) as our MQTT broker, with TLS enabled.
|
|
|
|
For local development we use [Mosquitto](https://mosquitto.org/) as our MQTT broker, with TLS enabled.
|
|
|
@ -17,7 +19,6 @@ For local development we use [Mosquitto](https://mosquitto.org/) as our MQTT bro
|
|
|
|
sudo apt install mosquitto-clients
|
|
|
|
sudo apt install mosquitto-clients
|
|
|
|
```
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
First generate local development certs using:
|
|
|
|
First generate local development certs using:
|
|
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
```
|
|
|
@ -38,6 +39,20 @@ Stop the local development environment with:
|
|
|
|
make stop-dev
|
|
|
|
make stop-dev
|
|
|
|
```
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
### Testing
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Unit tests can be run with:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
make test
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Integration tests are run via:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
make test-integration
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
## Usage
|
|
|
|
## Usage
|
|
|
|
|
|
|
|
|
|
|
|
*Instructions TBD*
|
|
|
|
*Instructions TBD*
|
|
|
|