| CARVIEW |
legion-discovery: A discovery service based on Legion.
A simple service discovery service based on Legion, that natively supports the idea of interface versions, and the idea that clients may only be interested in finding certain (compatible) versions of the services they are looking for.
[Skip to Readme]
Downloads
- legion-discovery-1.0.0.1.tar.gz [browse] (Cabal source package)
- Package description (as included in the package)
Maintainer's Corner
For package maintainers and hackage trustees
Candidates
- No Candidates
| Versions [RSS] | 0.2.1.0, 0.2.1.1, 0.2.2.0, 0.2.2.1, 0.2.2.2, 0.3.0.0, 0.3.0.1, 0.3.0.2, 1.0.0.0, 1.0.0.1 |
|---|---|
| Dependencies | aeson (>=0.11.2.1 && <1.1), attoparsec (>=0.13.1.0 && <0.14), base (>=4.8 && <4.10), binary (>=0.8.3.0 && <0.9), bytestring (>=0.10.8.1 && <0.11), Cabal (>=1.24.0.0 && <1.25), canteven-http (>=0.1.2.0 && <0.2), canteven-log (>=2.0.0.1 && <2.1), conduit (>=1.2.8 && <1.3), containers (>=0.5.7.1 && <0.6), data-default-class (>=0.1.2.0 && <0.2), ekg (>=0.4.0.11 && <0.5), graphviz (>=2999.18.1.2 && <2999.19), http-api-data (>=0.2.4 && <0.4), http-grammar (>=0.1.0.0 && <0.2), legion (>=0.9 && <0.10), legion-discovery, legion-extra (>=0.1.2.0 && <0.2), monad-logger (>=0.3.20.1 && <0.4), mtl (>=2.2.1 && <2.3), servant-server (>=0.8.1 && <0.10), SHA (>=1.6.4.1 && <1.7), text (>=1.2.2.1 && <1.3), time (>=1.6.0.1 && <1.7), wai (>=3.2.1.1 && <3.3), wai-extra (>=3.0.19 && <3.1), warp (>=3.2.9 && <3.3) [details] |
| License | Apache-2.0 |
| Copyright | 2016 Rick Owens |
| Author | Rick Owens |
| Maintainer | rick@owensmurray.com |
| Uploaded | by taphu at 2017-04-30T19:58:51Z |
| Category | value |
| Home page | https://github.com/owensmurray/legion-discovery#readme |
| Source repo | head: git clone https://github.com/owensmurray/legion-discovery |
| Distributions | |
| Executables | legion-discovery |
| Downloads | 6697 total (34 in the last 30 days) |
| Rating | (no votes yet) [estimated by Bayesian average] |
| Your Rating |
|
| Status | Docs available [build log] Last success reported on 2017-04-30 [all 1 reports] |
Readme for legion-discovery-1.0.0.1
[back to package description]legion-discovery
A simple service discovery service based on Legion, that natively supports the idea of interface versions, and the idea that clients may only be interested in finding certain (compatible) versions of the services they are looking for.
The initial motivation for this project is to act as a test driver for the Legion framework. Since the status of that framework is still experimental, the status of this service is also experimental.
API
POST /v1/ping
Register a service. The service name and version are obtained via the
User-Agent header field. Registration expires in 30 seconds.
- Request
- Content-Type:
application/vnd.legion-discovery.ping-request+json - Headers:
User-Agent: TheUser-Agentrequest header is mandatory, and must conform to the grammar specified in RFC-2616 and, further, must provide the product version that RFC-2616 describes as optional.
- Content-Type:
- Response
204 No Content: indicates a successful registration.
GET /v1/services/:serviceId
Returns all current instances of a service, regardless of version.
-
Request
- Headers:
User-Agent: TheUser-Agentrequest header is mandatory, and must conform to the grammar specified in RFC-2616
- Headers:
-
Response
200 Ok- Content-Type:
application/vnd.legion-discovery.instance-list+json
- Content-Type:
GET /v1/services/:serviceId/:versionRange
Returns the service instances that match the requested version range. The
version range syntax is the same as what cabal understands
(e.g. >= 0.1 && < 0.2). You are really going to want to make sure and url
encode this segment of the url.
-
Request
- Headers:
User-Agent: TheUser-Agentrequest header is mandatory, and must conform to the grammar specified in RFC-2616
- Headers:
-
Response
200 Ok- Content-Type:
application/vnd.legion-discovery.instance-list+json
- Content-Type:
GET /v1/graph
Returns a visualization of the service interactions. This endpoint supports
multiple content types via the Accept header.
- Response
200 Ok- Content-Type
image/svg+xml - Content-Type
text/vnd.graphviz
- Content-Type
Content Types
application/vnd.legion-discovery.instance-list+json
{
"https://host1:8080": {
"version": "1.0.2.0"
},
"https://host2:8080": {
"version": "1.0.2.0"
},
"https://host3:8080": {
"version": "1.0.2.0"
}
}
application/vnd.legion-discovery.ping-request+json
{
"serviceAddress": "https://host3:8080"
}