docker pull ghcr.io/mpiekutowski/linter:1.0
docker pull ghcr.io/mpiekutowski/linter:1.1
docker pull ghcr.io/mpiekutowski/linter:1.2
docker pull ghcr.io/mpiekutowski/linter:2.0
docker compose up
POST
/
create
key |
type |
description |
lang |
String |
Language for which to create a linter |
key |
type |
description |
status |
String |
Result of operation, ok for successful creation |
ip |
String |
IP address of the created linter |
key |
type |
description |
status |
String |
Result of operation, error for invalid request parameter |
message |
String |
Detailed explanation of error |
key |
type |
description |
status |
String |
Result of operation, error for internal server error |
message |
String |
Detailed explanation of error |
POST
/
delete
key |
type |
description |
ip |
String |
IP address of the linter to delete |
key |
type |
description |
status |
String |
Result of operation, ok for successful deletion |
key |
type |
description |
status |
String |
Result of operation, error for invalid request parameter |
message |
String |
Detailed explanation of the error |
key |
type |
description |
status |
String |
Result of operation, error for internal server error |
message |
String |
Detailed explanation of the error |
Initializing update to new version:
POST
/
init-update
key |
type |
description |
lang |
String |
Language for which to initiate the update |
version |
String |
Target version to update to |
key |
type |
description |
status |
String |
Result of operation, ok for successful initiation of update |
key |
type |
description |
status |
String |
Result of operation, error for invalid request parameters |
message |
String |
Detailed explanation of the error |
key |
type |
description |
status |
String |
Result of operation, error for internal server error |
message |
String |
Detailed explanation of the error |
Progressing to next update step:
POST
/
update
key |
type |
description |
lang |
String |
Language for which to perform the update |
key |
type |
description |
status |
String |
Result of operation, ok for successful update |
key |
type |
description |
status |
String |
Result of operation, error for invalid request parameters |
message |
String |
Detailed explanation of the error |
key |
type |
description |
status |
String |
Result of operation, error for internal server error |
message |
String |
Detailed explanation of the error |
Rolling back to previous update step:
POST
/
rollback
key |
type |
description |
lang |
String |
Language for which to perform the rollback |
key |
type |
description |
status |
String |
Result of operation, ok for successful rollback |
key |
type |
description |
status |
String |
Result of operation, error for invalid request parameters |
message |
String |
Detailed explanation of the error |
key |
type |
description |
status |
String |
Result of operation, error for internal server error |
message |
String |
Detailed explanation of the error |
Getting status of currently running linters
GET
/
status
Request body is empty for that request.
key |
type |
description |
linters |
JSON[] |
Array of JSON objects describing currently running linters |
Each JSON object has one key of type String
- the IP of the linter. Value for that key is another JSON object with the following fields:
key |
type |
description |
is_healthy |
Boolean |
Health status of the linter |
version |
String |
Version of the linter |
lang |
String |
Language that can be linted |
request_count |
Integer |
Number of requests that were served by the linter |
{
"linters": [
{
"127.0.0.1": {
"is_healthy": true,
"version": "2.0",
"lang": "java",
"request_count": 5
},
"127.0.0.2": {
"is_healthy": false,
"version": "1.0",
"lang": "python",
"request_count": 1
}
}
]
}
Forwarding request to linter chosen by load balancing algorithm:
POST
/
lint
key |
type |
description |
code |
String |
Code to be linted |
http code |
description |
200 |
There is linter to handle the request |
503 |
No available linters |
Adding linter to load balancing queue:
POST
/
add
key |
type |
description |
lang |
String |
Language of linter to add |
version |
String |
Version of linter to add |
uri |
String |
URI of linter to add |
secretKey |
String |
Key for authorization |
http code |
description |
200 |
Addition comleted |
400 |
Language not supported or invalid URI |
403 |
Auth failed |
Removing linter from load balancing queue:
POST
/
remove
key |
type |
description |
uri |
String |
URI of linter to remove |
secretKey |
String |
Key for authorization |
http code |
description |
200 |
Removal copmpleted |
400 |
Invalid URI |
403 |
Auth failed |
Updating load balancing ratio between version:
POST
/
ratio
key |
type |
description |
lang |
String |
Lang of linters |
versionRatio |
Dict |
{"v1": Int, "v2":Int, ...} Any number of keys as long as their values sum up to arbitrary total ratio |
secretKey |
String |
Key for authorization |
http code |
description |
200 |
Ratio updated |
400 |
Wrong total ratio or language not supported |
403 |
Auth failed |
Checking load balancer status:
GET
/
health
POST
/
lint
key |
type |
description |
code |
String |
URI of linter to remove |
key |
type |
description |
result |
Boolean |
Linting passed or failed |
details |
String |
Message for user |
GET
/
health
key |
type |
description |
version |
String |
Version of linter |
language |
String |
Language of linter |
requestCount |
Int |
Number of requests served by linter |