• Stars
    star
    124
  • Rank 279,320 (Top 6 %)
  • Language
    Go
  • License
    MIT License
  • Created about 5 years ago
  • Updated 6 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

An example Event-Driven application in Go built with Watermill library.

Event-Driven application example

This is an example Event-Driven application written in Go, using Watermill.

The projects aims to integrate incoming GitHub webhooks with Grafana and Slack, essentially adding annotations and sending messages when a new commit is pushed. There are also simulated deployment messages sent over RabbitMQ to demonstrate working with multiple event streams.

An example result can look like this:

Running

If you'd like to integrate the example with your Slack workspace, copy .env-example to .env and fill in the webhook URL in SLACK_WEBHOOK_URL variable.

In addition to the application, the docker-compose environment consists of:

  • Kafka and ZooKeeper
  • RabbitMQ
  • Grafana
  • Prometheus

The whole environment can be run with:

docker-compose up

You can now configure your GitHub repository to send webhooks to the application (you need to expose port 8080 to the external network first).

Alternatively, you can run ./scripts/send-stub-webhook.sh to send some stub webhooks.

Visit localhost:3000/d/webhooks to see annotations added in Grafana. Use admin:secret as credentials.

Metrics

You can access the Watermill dashboard at localhost:3000/d/watermill. See what changes when you send more webhooks over time.

What's next?

See Watermill's documentation to learn more.

More Repositories

1

watermill

Building event-driven applications the easy way in Go.
Go
6,660
star
2

wild-workouts-go-ddd-example

Go DDD example application. Complete project to show how to apply DDD, Clean Architecture, and CQRS by practical refactoring.
Go
4,822
star
3

go-web-app-antipatterns

Short examples of common anti-patterns in Go Web Applications.
Go
288
star
4

monolith-microservice-shop

Source code for https://threedots.tech/post/microservices-or-monolith-its-detail/ article.
Go
234
star
5

nats-example

An example Go project for running local development environment, with hot code reloading.
Go
98
star
6

watermill-sql

SQL (Postgres/MySQL) Pub/Sub for the Watermill project.
Go
55
star
7

watermill-amqp

AMQP Pub/Sub for the Watermill project.
Go
53
star
8

watermill-kafka

Kafka Pub/Sub for the Watermill project.
Go
51
star
9

watermill-nats

NATS Pub/Sub for the Watermill project.
Go
44
star
10

meteors

An example 2D game made with Go and Ebitengine.
Go
36
star
11

watermill-redisstream

Redis Pub/Sub for the Watermill project, leveraging Redis Stream.
Go
28
star
12

watermill-http

HTTP Pub/Sub for the Watermill project.
Go
26
star
13

go-event-driven

Materials for https://threedots.tech/event-driven/
Go
23
star
14

esja

Event Sourcing library in Go.
Go
19
star
15

watermill-benchmark

Benchmarking tools for Watermill.
Go
17
star
16

watermill-googlecloud

Google Cloud Pub/Sub for the Watermill project.
Go
14
star
17

watermill-amazonsqs

Go
13
star
18

watermill-jetstream

Go
9
star
19

cli

Go
8
star
20

watermill-io

IO Pub/Sub for the Watermill project.
Go
8
star
21

watermill-bolt

Bolt Pub/Sub for the Watermill project.
Go
6
star
22

pii

Go
4
star
23

wait-for

A simple "wait for port" utility.
Go
1
star