Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/koladev32/golang-wehook
A simple repository showcasing how to build an architecture with webhook delivery using Golang.
https://github.com/koladev32/golang-wehook
Last synced: 21 days ago
JSON representation
A simple repository showcasing how to build an architecture with webhook delivery using Golang.
- Host: GitHub
- URL: https://github.com/koladev32/golang-wehook
- Owner: koladev32
- Created: 2023-08-12T20:27:55.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-08-13T13:10:01.000Z (over 1 year ago)
- Last Synced: 2023-08-13T14:30:17.996Z (over 1 year ago)
- Language: Go
- Size: 3.68 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Webhook Service in Golang
This project demonstrates a webhook service implemented in Golang. It uses Redis for message queuing and supports exponential backoff and concurrent processing using goroutines.
## Features
- **Concurrent Processing**: Processes multiple webhooks simultaneously using goroutines.
- **Exponential Backoff**: Implements a retry mechanism with exponential backoff for failed webhook deliveries.
- **Redis Integration**: Utilizes Redis for message queuing and pub/sub messaging.
- **Dockerized Application**: Easily deployable using Docker.## Prerequisites
- Go 1.21 or higher
- Redis server
- Docker (optional for containerized deployment)## Getting Started
### Clone the Repository
```bash
git https://github.com/koladev32/golang-wehook.git
cd golang-wehook
```### Set Up Environment Variables
Create a `.env` file at the root of the project and add the following content:
```txt
REDIS_ADDRESS=redis:6379
WEBHOOK_ADDRESS=
```Replace `` with your webhook URL.
### Running with Docker
Build and start the container:
```bash
docker compose up -d --build
```Track the logs:
```bash
docker compose logs -f
```Hit `http://127.0.0.1:8000/payment` to start sending data to the webhook service through Redis.
## Testing
You can use a service like [webhook.site](https://webhook.site) to obtain a free webhook URL for testing.