Categorygithub.com/gbdevw/glocbus
modulepackage
1.0.0
Repository: https://github.com/gbdevw/glocbus.git
Documentation: pkg.go.dev

# README

glocbus

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:

image

Run the demo

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.

Getting started

Here are the high level steps to use Glocbus:

  1. Implement an event source like the one from the example.
  2. Register the event source to the event bus and start it.
  3. 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).

# Packages

No description provided by the author
No description provided by the author
No description provided by the author

# Functions

# Description Build and return a new event bus without any event source set.

# Structs

Structure which holds all data and components used by the event bus to an manage event source.
Mock for an event source.
Event-bus implementation that amanges event sources and propagators to relay events in a publish-subscribe fashion.

# Interfaces

Interface for an event bus that coordinates event sources, event propagators and subscribers.
Interface for an event source.

# Type aliases

Can be used by the users to provide more information about an event source.