Connector¶
How can I create my connector?¶
A connector must expose a HTTP API with specific endpoints:
- /service/<service_name>/scale: Endpoint used to ensure that a number of containers are running for a service
- /service/<service_name>/status: Endpoint used to return the number of running resources for a service
These are the mandatory endpoints. Genisys will use them when trying to automatically scale services.
The connector is not limited to these and could expose other endpoints (for example, a specific endpoint to define a service).
/service/<service_name>/scale
¶
This endpoint must ensure that a specific number of containers associated to a service are running.
It must expects a JSON request body to be POST.
The request body must look like:
{
"number": number_of_containers,
}
The number field is mandatory.
/service/<service_name>/status
¶
This endpoint must returns the number of running resources for a service managed by this connector.
When hitting the endpoint with a GET, it must returns a JSON body like this:
{
"running_resources": number_of_running_resources,
}