examples

command
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2018 License: Apache-2.0 Imports: 17 Imported by: 0

README

example

The following example will show off the usage of patron involving all components implemented. The processing will be kicked of by sending a request to the HTTP component. The flow then will be the following:

  • HTTP -> RabbitMQ publish
  • RabbitMQ consumer -> kafka publish
  • Kafka consumer -> log to stdout

Since tracing instrumentation is in place we can observer the flow in jaeger.

Prerequisites

  • Docker
  • Docker compose

setting up environment

To run the full example we need to start jaeger and prometheus. We can startup both of them using docker-compose with the following command.

docker-compose up -d

To tear down the above just:

docker-compose down

running the example

just run (within the examples folder):

go run main.go

and the use curl to send a request:

curl -i -H "Content-Type: application/json" -X POST http://localhost:50000

After that head over to jaeger and prometheus.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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