Glocbus is an event bus and a framework to publish events within a Golang application. Based on CloudEvent and OpenTelemetry, Glocbus aims to be fully observable and provide end-to-end traceability for propagated events:
An example of an application that uses Glocbus to publish and consume heartbeat events can be found under the example folder.
The easiest way to run the demo and witness how Glocbus fulfills its promise of end-to-end event traceability is to use the docker-compose file. Two containers will be started: One that will run the example and another one that will run a all-in-one jaeger instance (monitoring).
docker-compose up
Once containers have been started, you can open a browser and open the Jaeger UI at http://localhost:16686 to inspect received traces.
Here are the high level steps to use Glocbus:
- Implement an event source like the one from the example.
- Register the event source to the event bus and start it.
- Use the event bus to subscribe to the event source.
Please take a look at the example application which shows how to implement and use all involved components. The example uses the uber.fx framework to manage the application lifecycle and the dependency injection (see providers).