mirror of
https://github.com/datarhei/core.git
synced 2025-10-04 15:42:57 +08:00
Add /cluster/transfer/:id endpoint to transfer leadership to another node
This commit is contained in:
@@ -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": {
|
||||
|
Reference in New Issue
Block a user