Go Protocol Buffer
Switch branches/tags
Nothing to show
Clone or download
Latest commit 2739a9b Mar 22, 2017
Permalink
Failed to load latest commit information.
api updated service name Mar 22, 2017
proto first commit Mar 15, 2017
.gitignore Added gitignore Mar 16, 2017
Dockerfile Added kubernetes registry Mar 16, 2017
README.md changed YAML Mar 17, 2017
go-device-dep.yaml changed YAML Mar 17, 2017
go-device-pod.yaml Added YAML for Kubernetes Mar 16, 2017
main.go updated service name Mar 22, 2017

README.md

go-device

Device API with Go Micro

  • To run as server: go run main.go
  • To run as client: go run main.go --run_client

Without any parameters, server and client expect Consul to register or query the service. If you want to run the service and client without any external registries like Consul, use multicast DNS instead like so:

  • Server: go run main.go --registry mdns
  • Client: go run main.go --registry mdns

The Dockerfile uses the empty scratch image and requires that you build a static exe with the following command:

CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o main .

To run in a container, you can use environment variables to specify options like the registry to use like so:

docker run --env MICRO_REGISTRY=mdns image_tag

To deploy to Kubernetes use:

kubectl create -f go-device-dep.yaml