lnrpc: add GetState to stateservice (v1/state)

This commit adds a new GetState call to the state service in order to
make leader election integrate simply with k8s using a readinessProbe.
This commit is contained in:
Andras Banki-Horvath committed 2021-05-04 17:33:13 +02:00
1 parent 7caf26ce94
commit 9aacc35989
6 files changed
+346 -42

No files matched your search

+31
View File
@@ -11,6 +11,29 @@
"application/json"
],
"paths": {
"/v1/state": {
"get": {
"summary": "GetState returns the current wallet state without streaming further\nchanges.",
"operationId": "GetState",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/lnrpcGetStateResponse"
}
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/runtimeError"
}
}
},
"tags": [
"State"
]
}
},
"/v1/state/subscribe": {
"get": {
"summary": "SubscribeState subscribes to the state of the wallet. The current wallet\nstate will always be delivered immediately.",
@@ -45,6 +68,14 @@
}
},
"definitions": {
"lnrpcGetStateResponse": {
"type": "object",
"properties": {
"State": {
"$ref": "#/definitions/lnrpcWalletState"
}
}
},
"lnrpcSubscribeStateResponse": {
"type": "object",
"properties": {