• Stars
    star
    131
  • Rank 275,867 (Top 6 %)
  • Language
    Go
  • License
    MIT License
  • Created almost 6 years ago
  • Updated about 1 year 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
7,251
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
5,176
star
3

go-web-app-antipatterns

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

monolith-microservice-shop

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

nats-example

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

watermill-sql

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

watermill-kafka

Kafka Pub/Sub for the Watermill project.
Go
57
star
8

watermill-amqp

AMQP Pub/Sub for the Watermill project.
Go
54
star
9

watermill-nats

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

meteors

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

watermill-redisstream

Redis Pub/Sub for the Watermill project.
Go
30
star
12

watermill-http

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

go-event-driven

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

esja

Event Sourcing library in Go.
Go
19
star
15

watermill-benchmark

Benchmarking tools for Watermill.
Go
18
star
16

watermill-googlecloud

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

watermill-aws

Amazon SQS/SNS Pub/Sub for the Watermill project.
Go
16
star
18

cli

Go
10
star
19

watermill-jetstream

Go
9
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
5
star
23

github-releases-dashboard

A simple dashboard to keep track of GitHub releases.
Go
1
star
24

wait-for

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

watermill-terraform

Terraform definitions for Watermill-related repositories and infrastructure.
HCL
1
star