Add /cluster/transfer/:id endpoint to transfer leadership to another node

This commit is contained in:
Ingo Oppermann
2023-07-11 14:26:54 +02:00
parent d04254c891
commit 0f06b8b5a0
14 changed files with 338 additions and 12 deletions

View File

@@ -1078,6 +1078,50 @@ const docTemplateClusterAPI = `{
}
}
}
},
"/v1/transfer/{id}": {
"put": {
"description": "Transfer leadership",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"v1.0.0"
],
"summary": "Transfer leadership",
"operationId": "cluster-1-transfer-leadership",
"parameters": [
{
"type": "string",
"description": "Origin ID of request",
"name": "X-Cluster-Origin",
"in": "header"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "string"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/cluster.Error"
}
},
"508": {
"description": "Loop Detected",
"schema": {
"$ref": "#/definitions/cluster.Error"
}
}
}
}
}
},
"definitions": {