wai-middleware-consul-0.1.0.2: Wai Middleware for Consul

Copyright(c) FPComplete, 2015
LicenseMIT
MaintainerTim Dysinger <tim@fpcomplete.com>
Stabilityexperimental
PortabilityPOSIX
Safe HaskellNone
LanguageHaskell2010

Network.Wai.Middleware.Consul.GitHub

Description

This module contains specific configuration for using WAI Middleware for Consul with Github. We can configure a GitHub Webhook to POST to consul middleware. Consul middleware will push the GitHub webhook payload to Consul. Consul will let every WAI application know of the data update & each application will execute `git pull` to update their git repository contents.

      ┌─────────┐      ┌─────────┐
      │ Github  │      │         │
      │  Repo   │─────▶│ AWS ELB │
      │ Webhook │      │         │
      └─────────┘      └─────────┘
                            │
        ┌────────────┬──────┘─ ─ ─
        │                         │
        ▼            ▼            ▼
   ┌─────────┐  ┌─────────┐  ┌─────────┐
   │         │  │         │  │         │
┌──│ WAI App │  │ WAI App │  │ WAI App │
│  │         │  │         │  │         │
│  └─────────┘  └─────────┘  └─────────┘
│                    ▲            ▲
│                    │            │
│       ┌────────────┴────────────┘
│       │
│       │
│  ┌─────────┐  ┌─────────┐  ┌─────────┐
│  │         │  │         │  │         │
└─▶│ Consul  │──│ Consul  │──│ Consul  │
   │         │  │         │  │         │
   └─────────┘  └─────────┘  └─────────┘

Synopsis

Documentation

gitHubPullOnWebhook :: ConsulSettings Source

GitHub Webhook handler with Consul callback that does a `git pull` when fired.