1
0
mirror of https://github.com/bumi/lnrpc synced 2026-02-14 15:27:50 +00:00

Add support for v0.11 GRPC services

This also refactors the client GRPC wrapper to dynamically load the
request objects.
All GRPC generated client files now live under lib/grpc_services
This commit is contained in:
2020-08-28 14:09:57 +02:00
parent 579fc423ea
commit 404ed3b99e
31 changed files with 2758 additions and 5878 deletions

View File

@@ -0,0 +1,48 @@
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: autopilotrpc/autopilot.proto
require 'google/protobuf'
Google::Protobuf::DescriptorPool.generated_pool.build do
add_file("autopilotrpc/autopilot.proto", :syntax => :proto3) do
add_message "autopilotrpc.StatusRequest" do
end
add_message "autopilotrpc.StatusResponse" do
optional :active, :bool, 1
end
add_message "autopilotrpc.ModifyStatusRequest" do
optional :enable, :bool, 1
end
add_message "autopilotrpc.ModifyStatusResponse" do
end
add_message "autopilotrpc.QueryScoresRequest" do
repeated :pubkeys, :string, 1
optional :ignore_local_state, :bool, 2
end
add_message "autopilotrpc.QueryScoresResponse" do
repeated :results, :message, 1, "autopilotrpc.QueryScoresResponse.HeuristicResult"
end
add_message "autopilotrpc.QueryScoresResponse.HeuristicResult" do
optional :heuristic, :string, 1
map :scores, :string, :double, 2
end
add_message "autopilotrpc.SetScoresRequest" do
optional :heuristic, :string, 1
map :scores, :string, :double, 2
end
add_message "autopilotrpc.SetScoresResponse" do
end
end
end
module Autopilotrpc
StatusRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("autopilotrpc.StatusRequest").msgclass
StatusResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("autopilotrpc.StatusResponse").msgclass
ModifyStatusRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("autopilotrpc.ModifyStatusRequest").msgclass
ModifyStatusResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("autopilotrpc.ModifyStatusResponse").msgclass
QueryScoresRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("autopilotrpc.QueryScoresRequest").msgclass
QueryScoresResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("autopilotrpc.QueryScoresResponse").msgclass
QueryScoresResponse::HeuristicResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("autopilotrpc.QueryScoresResponse.HeuristicResult").msgclass
SetScoresRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("autopilotrpc.SetScoresRequest").msgclass
SetScoresResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("autopilotrpc.SetScoresResponse").msgclass
end

View File

@@ -0,0 +1,40 @@
# Generated by the protocol buffer compiler. DO NOT EDIT!
# Source: autopilotrpc/autopilot.proto for package 'autopilotrpc'
require 'grpc'
require 'autopilotrpc/autopilot_pb'
module Autopilotrpc
module Autopilot
# 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.
class Service
include GRPC::GenericService
self.marshal_class_method = :encode
self.unmarshal_class_method = :decode
self.service_name = 'autopilotrpc.Autopilot'
#
# Status returns whether the daemon's autopilot agent is active.
rpc :Status, StatusRequest, StatusResponse
#
# ModifyStatus is used to modify the status of the autopilot agent, like
# enabling or disabling it.
rpc :ModifyStatus, ModifyStatusRequest, ModifyStatusResponse
#
# 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.
rpc :QueryScores, QueryScoresRequest, QueryScoresResponse
#
# SetScores attempts to set the scores used by the running autopilot agent,
# if the external scoring heuristic is enabled.
rpc :SetScores, SetScoresRequest, SetScoresResponse
end
Stub = Service.rpc_stub_class
end
end