Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/j3k0/ganomede-registry
Ganomede Registry
https://github.com/j3k0/ganomede-registry
Last synced: 9 days ago
JSON representation
Ganomede Registry
- Host: GitHub
- URL: https://github.com/j3k0/ganomede-registry
- Owner: j3k0
- Created: 2015-01-23T09:31:40.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2019-03-22T21:05:14.000Z (almost 6 years ago)
- Last Synced: 2024-11-01T03:42:29.879Z (about 2 months ago)
- Language: CoffeeScript
- Size: 134 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Description
-----------[![Greenkeeper badge](https://badges.greenkeeper.io/j3k0/ganomede-registry.svg)](https://greenkeeper.io/)
Registry module:
- maintains the list of running services.
- takes care of pinging the services to check that they're still running.
- use "bouncy" to proxy requests to the right hostRelations
---------- List of running services is holded in memory.
- List of running services is discovered uing environment variables.Proxy
-----Accessible on port 8080 by default.
Registry's API
--------------Accessible on port 8000 by default.
Background job
--------------Registry will:
* check services defined in environment variables matching `SERVICE_*_PORT`
* request in HTTP their "/about" URI
* expect a JSON body containing```js
{
"type": "users",
"version": "1.0.0",
"startDate": "2015-01-23T13:38:48+02:00"
}
```* request to `/{service-name}/{version}/...` will then be proxied to the appropriate service.
```js
"/users/v1/login" // proxied to one of the "users" service instances.
```# API
## /registry/v1/services [GET]
### parameters
"type" (optional) filter by type (TODO)
### response [200] OK
[
{
"type": "users",
"version": "1.0.1",
"host": "192.168.1.2",
"port": 8000,
"pingMs": 12
},
{
"type": "invitations",
"version": "1.0.3",
"host": "192.168.1.4",
"port": 8000,
"pingMs": 15
}
]`pingMs` is in a value in milliseconds.