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

+11
View File
@@ -29,6 +29,10 @@ service State {
// state will always be delivered immediately.
rpc SubscribeState (SubscribeStateRequest)
returns (stream SubscribeStateResponse);
// GetState returns the current wallet state without streaming further
// changes.
rpc GetState (GetStateRequest) returns (GetStateResponse);
}
enum WalletState {
@@ -46,3 +50,10 @@ message SubscribeStateRequest {
message SubscribeStateResponse {
WalletState state = 1;
}
message GetStateRequest {
}
message GetStateResponse {
WalletState State = 1;
}