Skip to content

zuchka/fing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FING

Don't route it. Don't transform it. FING it.


What

FING is a JSON event router. Send it any JSON event. It evaluates routes. It transforms and forwards. That's it.

Single binary. No database. No agents. No cloud account. Works anywhere.


Quickstart

  1. Copy the example config

    cp fing.yaml.example fing.yaml
    fing validate
    
  2. Start FING

    fing serve
    fing serve --config /etc/myapp/fing.yaml
    
  3. Send an event

    curl -X POST http://localhost:9090/ingest \
      -H "Content-Type: application/json" \
      -d '{"action":"opened","pull_request":{"title":"Fix thing"},"repository":{"name":"myrepo"}}'
    
  4. Or pipe

    cat events.ndjson | fing serve
    

Routes

One YAML file. Lives in your repo. Ships with your code.

destinations:
  slack:
    type: webhook
    url: https://hooks.slack.com/services/...
    headers:
      Authorization: Bearer ${SLACK_TOKEN}

routes:
  - name: pr-notify
    filter: '.action == "opened"'
    transform: |
      {
        text: ("PR opened: " + .pull_request.title),
        repo: .repository.name
      }
    to:
      - slack
      - stdout

All jq forms work in filter and transform. If you can express it in jq, FING handles it. If you can't, write a service.

Route behavior:

  • filter — jq expression returning truthy/falsy. Omit to match all events.
  • transform — jq expression returning the outbound object. Omit to forward raw input.
  • to — list of destinations. stdout is always available, no declaration required.
  • Fan-out: all matching routes fire for each event.

HTTP API

POST /ingest   — Send an event
GET  /health   — Health check
GET  /routes   — List routes + destination queue depths
POST /reload   — Hot-reload config

Operations

kill -HUP <pid>   or   curl -X POST http://localhost:9090/reload

SIGTERM/SIGINT — drains in-flight deliveries, exits 0.


Destinations

Webhooks defined once, referenced by name. stdout built-in.

4xx responses dropped. 5xx retried with exponential backoff.

Environment variables interpolated in url and headers: ${MY_VAR}.


Install

# coming soon
brew install zuchka/tap/fing
curl -sf https://start.fing.ing | sh

MIT license · fing.ing

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages