Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/nicholasjackson/pipe

Multi provider event grid written in go
https://github.com/nicholasjackson/pipe

events golang nats openfaas

Last synced: 23 days ago
JSON representation

Multi provider event grid written in go

Awesome Lists containing this project

README

        

# Pipe - Event Grid and Message Router

[![Docker Repository on Quay](https://quay.io/repository/nicholasjackson/faas-nats/status "Docker Repository on Quay")](https://quay.io/repository/nicholasjackson/pipe)
[![CircleCI](https://circleci.com/gh/nicholasjackson/pipe.svg?style=svg)](https://circleci.com/gh/nicholasjackson/pipe)
[![Maintainability](https://api.codeclimate.com/v1/badges/a3c44667f431244a86ae/maintainability)](https://codeclimate.com/github/nicholasjackson/pipe/maintainability)

This project allows you to listen to a variety of message sources and perform an action when a message is received. The documentation and the project is currently work in progress however curretly supported providers are:
* Nats.io - read and write to nats streaming
* HTTP - receive and send events over http

The project is built around a provider model where plugable elements can be added to the server to allow support for a variety of message sources.

Planned providers:
* Log files - read and write to log files
* SQS - AWS Simple Message Queue
* PubSub - Google pub sub
* Kafka
* And more.

## Configuration
To configure pipes HCL configuration file is used...

```yaml
# Input block, will listen for nats messages on defined queue
input "nats_queue" "nq_in" {
server = "nats://nats.service.consul:4222"
cluster_id = "test-cluster"
queue = "testmessagequeue"
}

# Output block, defines a http output
output "http" "nq_out" {
protocol = "http"
server = "localhost"
port = 8080
path = "/message"
}

pipe "accept_nats" {
# Name of the input block
input = "nq_in"

# Do not handle messages older than
expiration = "1h"

# Action to perform when a new message is received
action {
# Name of the output
output = "nq_out"

# Transform the initial message
template = <