tundra

command module
v0.0.0-...-6187434 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 24, 2018 License: MIT Imports: 8 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

tundra

HTTP-MQTT bridge in pure golang :)

Tundra is a HTTP-MQTT bridge written in pure golang.

Installation

$ go get github.com/sriramsv/tundra
$ go install github.com/sriramsv/tundra

Usage


tundra --help

Usage: tundra [OPTIONS]

HTTP-MQTT bridge

Options:
      --port             port to listen on! (env $TUNDRA_PORT) (default "3000")
      --mqtt-user        username of mqtt broker (env $TUNDRA_MQTT_USER)
      --mqtt-port        mqtt broker port (env $TUNDRA_MQTT_PORT)
      --mqtt-pwd         mqtt broker password (env $TUNDRA_MQTT_PWD)
      --mqtt-host        MQTT broker host (env $TUNDRA_MQTT_HOST)
      --mqtt-client-id   port to listen on! (env $TUNDRA_MQTT_CLIENT_ID) (default "tundra")
      

TO publish a message to the broker, send a POST request to the server as follows:


curl -X POST \
  http://localhost:3000/publish \
  -H 'content-type: application/json' \
  -d '{
	"topic":"tundra",
	"message":"its alright!",
	"qos": 2,
	"retain": false
}'

Note: The connection from the server to the broker only supports tcp connections currently. So your data will go unencrypted over the wire.

TODO

  • Add TLS support
  • Add websocket support for subscriptions to topics

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址