ocgokitexample

package module
v0.0.0-...-a52efcf Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2018 License: Apache-2.0 Imports: 0 Imported by: 0

README

opencensus-gokit-example

Example of using OpenCensus with Go kit

Go Report Card

notable dependencies

  • Go kit
  • OpenCensus
  • gRPC
  • Twirp
  • Zipkin

build services

Services can be built by running go generate in the root of the project:

$ go generate ./...

running the services

Get a Zipkin instance running by following the directions as found here. This will allow the services instrumented with OpenCensus to export tracing details to a Zipkin backend.

Get etcd running for service discovery. Instructions to get it up and running can be found here.

Now you can start the various services included in this demo.

Example:

#!/bin/sh
nohup ./ocg-qrgenerator &>qrgenerator.log &
nohup ./ocg-device      &>device.log      &
nohup ./ocg-event       &>event.log       &
nohup ./ocg-frontend    &>frontend.log    &

Each service will dynamically select available ports to listen on and advertise these on etcd. It is possible to run multiple instances for each service on a single machine. The clients can automatically load balance and retry on the available services.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
clients
cli
qr
services
device/transport/pb
Package pb is a generated protocol buffer package.
Package pb is a generated protocol buffer package.
event/transport/pb
Package pb is a generated protocol buffer package.
Package pb is a generated protocol buffer package.
qr
qr/transport/pb
Package pb is a generated protocol buffer package.
Package pb is a generated protocol buffer package.
shared
oc
sd
Package sd provides utilities related to service discovery.
Package sd provides utilities related to service discovery.

Jump to

Keyboard shortcuts

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