Skip to content

qa-dev/universe

Repository files navigation

Universe

Build Status Coverage Status Go Report Card

Requirements

  • MongoDB
  • RabbitMQ

Setting up

  • Run make build
  • Edit dist/config.json
  • Just run dist/universe

How to use

There is only 3 endpoints and all of them are POST

  1. Send event
  2. Subscribe to event
  3. Unsubscribe from event

Let's explain all 3 endpoints:

Send event

Path: /e/<event_name>
Where event_name is any url-allowed sequence of chars.

Body: put any information about event in request body.

Subscribe

Path: /subscribe/<plugin_name>
Today only log and webhook (in url named as web) plugins are available.

Body: example for webhook plugin

{
    "event_name": "myservice.job.done",
    "url": "http://example.com/webhook"
}

Unsubscribe

Path: /unsubscribe/<plugin_name>

Body: example for webhook plugin

{
    "event_name": "myservice.job.done",
    "url": "http://example.com/webhook"
}

License

MIT