mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-03-04 09:48:19 +01:00
lnrpc: add autopilotrpc doc tags to enable lncli api doc generation
This commit is contained in:
parent
c0da9ca1b0
commit
b855566e6b
3 changed files with 26 additions and 4 deletions
|
@ -4,11 +4,29 @@ package autopilotrpc;
|
|||
|
||||
option go_package = "github.com/lightningnetwork/lnd/lnrpc/autopilotrpc";
|
||||
|
||||
/*
|
||||
* Comments in this file will be directly parsed into the API
|
||||
* Documentation as descriptions of the associated method, message, or field.
|
||||
* These descriptions should go right above the definition of the object, and
|
||||
* can be in either block or // comment format.
|
||||
*
|
||||
* An RPC method can be matched to an lncli command by placing a line in the
|
||||
* beginning of the description in exactly the following format:
|
||||
* lncli: `methodname`
|
||||
*
|
||||
* Failure to specify the exact name of the command will cause documentation
|
||||
* generation to fail.
|
||||
*
|
||||
* More information on how exactly the gRPC documentation is generated from
|
||||
* this proto file can be found here:
|
||||
* https://github.com/lightninglabs/lightning-api
|
||||
*/
|
||||
|
||||
// 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 {
|
||||
/*
|
||||
/* lncli: `autopilot status`
|
||||
Status returns whether the daemon's autopilot agent is active.
|
||||
*/
|
||||
rpc Status (StatusRequest) returns (StatusResponse);
|
||||
|
@ -19,7 +37,7 @@ service Autopilot {
|
|||
*/
|
||||
rpc ModifyStatus (ModifyStatusRequest) returns (ModifyStatusResponse);
|
||||
|
||||
/*
|
||||
/* lncli: `autopilot query`
|
||||
QueryScores queries all available autopilot heuristics, in addition to any
|
||||
active combination of these heruristics, for the scores they would give to
|
||||
the given nodes.
|
||||
|
|
|
@ -51,7 +51,7 @@
|
|||
},
|
||||
"/v2/autopilot/scores": {
|
||||
"get": {
|
||||
"summary": "QueryScores queries all available autopilot heuristics, in addition to any\nactive combination of these heruristics, for the scores they would give to\nthe given nodes.",
|
||||
"summary": "lncli: `autopilot query`\nQueryScores queries all available autopilot heuristics, in addition to any\nactive combination of these heruristics, for the scores they would give to\nthe given nodes.",
|
||||
"operationId": "Autopilot_QueryScores",
|
||||
"responses": {
|
||||
"200": {
|
||||
|
@ -124,7 +124,7 @@
|
|||
},
|
||||
"/v2/autopilot/status": {
|
||||
"get": {
|
||||
"summary": "Status returns whether the daemon's autopilot agent is active.",
|
||||
"summary": "lncli: `autopilot status`\nStatus returns whether the daemon's autopilot agent is active.",
|
||||
"operationId": "Autopilot_Status",
|
||||
"responses": {
|
||||
"200": {
|
||||
|
|
|
@ -18,11 +18,13 @@ const _ = grpc.SupportPackageIsVersion7
|
|||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||||
type AutopilotClient interface {
|
||||
// lncli: `autopilot status`
|
||||
// Status returns whether the daemon's autopilot agent is active.
|
||||
Status(ctx context.Context, in *StatusRequest, opts ...grpc.CallOption) (*StatusResponse, error)
|
||||
// ModifyStatus is used to modify the status of the autopilot agent, like
|
||||
// enabling or disabling it.
|
||||
ModifyStatus(ctx context.Context, in *ModifyStatusRequest, opts ...grpc.CallOption) (*ModifyStatusResponse, error)
|
||||
// lncli: `autopilot query`
|
||||
// QueryScores queries all available autopilot heuristics, in addition to any
|
||||
// active combination of these heruristics, for the scores they would give to
|
||||
// the given nodes.
|
||||
|
@ -80,11 +82,13 @@ func (c *autopilotClient) SetScores(ctx context.Context, in *SetScoresRequest, o
|
|||
// All implementations must embed UnimplementedAutopilotServer
|
||||
// for forward compatibility
|
||||
type AutopilotServer interface {
|
||||
// lncli: `autopilot status`
|
||||
// Status returns whether the daemon's autopilot agent is active.
|
||||
Status(context.Context, *StatusRequest) (*StatusResponse, error)
|
||||
// ModifyStatus is used to modify the status of the autopilot agent, like
|
||||
// enabling or disabling it.
|
||||
ModifyStatus(context.Context, *ModifyStatusRequest) (*ModifyStatusResponse, error)
|
||||
// lncli: `autopilot query`
|
||||
// QueryScores queries all available autopilot heuristics, in addition to any
|
||||
// active combination of these heruristics, for the scores they would give to
|
||||
// the given nodes.
|
||||
|
|
Loading…
Add table
Reference in a new issue