lnrpc: add autopilotrpc subservice

This commit adds a new service lnrpc/autopilot, that is to be used to
communicate with the running autopilot. Currently a RPC for getting the
status of the agent is included, as well as enabling/disabling at
runtime.
This commit is contained in:
Johan T. Halseth committed 2018-12-13 12:33:38 +01:00
1 parent cff42e06c8
commit db4bbe1c3a
2 files changed
+260

No files matched your search

+34
View File
@@ -0,0 +1,34 @@
syntax = "proto3";
package autopilotrpc;
// Autopilot is a service that can be used to get information about the current
// state of the daemon's autopilot agent, and also supply it with information
// that can be used when deciding where to open channels.
service Autopilot {
/**
Status returns whether the daemon's autopilot agent is active.
*/
rpc Status(StatusRequest) returns (StatusResponse);
/**
ModifyStatus is used to modify the status of the autopilot agent, like
enabling or disabling it.
*/
rpc ModifyStatus(ModifyStatusRequest) returns (ModifyStatusResponse);
}
message StatusRequest{
}
message StatusResponse{
/// Indicates whether the autopilot is active or not.
bool active = 1 [json_name = "active"];
}
message ModifyStatusRequest{
/// Whether the autopilot agent should be enabled or not.
bool enable = 1 [json_name = "enable"];
}
message ModifyStatusResponse {}