Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kaffarell/discoverus
Microservice discovery service
https://github.com/kaffarell/discoverus
Last synced: about 1 month ago
JSON representation
Microservice discovery service
- Host: GitHub
- URL: https://github.com/kaffarell/discoverus
- Owner: kaffarell
- Created: 2021-12-16T08:24:57.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2022-05-15T20:00:43.000Z (over 2 years ago)
- Last Synced: 2024-06-21T20:02:40.470Z (5 months ago)
- Language: Go
- Size: 65.4 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
![discoverus](https://user-images.githubusercontent.com/42062381/146393207-2a596522-0808-437c-97ca-33a500a86520.png)
# Docs
## REST Operations
| **Operation** | **HTTP Action** | **Return Value** |
|-------------------------------------|-----------------------------------|------------------|
| Register new Instance | POST /apps/**appId** | 200 OK |
| De-register application instance | DELETE /apps/**appId**/**instanceId** | 200 OK |
| Send application instance heartbeat | PUT /apps/**appId**/**instanceId** | 200 OK |
| Query for all appId instances | GET /apps/**appId** | 200 OK |
| Query for a specific instanceId | GET /apps/**appId**/**instanceId** | 200 OK |
| Dump all instances | GET /instances | 200 OK |## How-To register app to discoverus
Send a POST request to /apps/**appId** with the following object in json format:
```json
{
"id": "user"
"serviceType": "service"
"ip": "192_144.3.5"
"port": 87
"healthCheckUrl": "/hc"
}
```
## Run discoverus
The easiest way to run discoverus is to use the docker image provided:
```
docker build . -t discoverus
docker run -d -p 2000:2000 discoverus
```
The default internal port is 2000, but we can reroute it when using the docker container with the -p option.## Todo
* [x] Website that displays available services and instances
* [x] De-register instances
* [x] Automatically remove services in 30 sec / renew with heartbeat
* [x] Implement extensive logging
* [ ] Rewrite PostRegister function