Service Discovery Consul and Golang
Setup environtmen
touch ~/.dyno
Add environtmen
nano ~/.dyno
######### .dyno file #########
DISCOVERY_BROKER=consul
CONSUL_HOST=127.0.0.1:8500
consul agent -dev -ui
see templates/examples for dyno templates and templates for other service
Mac Os
$GOOS=darwin go build -o dyno src/main.go
Linux
$GOOS=linux go build -o dyno src/main.go
Windows
$GOOS=windows go build -o dyno src/main.go
./dyno service add -f templates/examples/dyno.yml
./dyno service delete -f templates/examples/dyno.yml
./dyno service add -f templates/examples/dyno.yml