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:
21
lib/grpc_services/watchtowerrpc/watchtower_pb.rb
Normal file
21
lib/grpc_services/watchtowerrpc/watchtower_pb.rb
Normal file
@@ -0,0 +1,21 @@
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# source: watchtowerrpc/watchtower.proto
|
||||
|
||||
require 'google/protobuf'
|
||||
|
||||
Google::Protobuf::DescriptorPool.generated_pool.build do
|
||||
add_file("watchtowerrpc/watchtower.proto", :syntax => :proto3) do
|
||||
add_message "watchtowerrpc.GetInfoRequest" do
|
||||
end
|
||||
add_message "watchtowerrpc.GetInfoResponse" do
|
||||
optional :pubkey, :bytes, 1
|
||||
repeated :listeners, :string, 2
|
||||
repeated :uris, :string, 3
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
module Watchtowerrpc
|
||||
GetInfoRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("watchtowerrpc.GetInfoRequest").msgclass
|
||||
GetInfoResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("watchtowerrpc.GetInfoResponse").msgclass
|
||||
end
|
||||
28
lib/grpc_services/watchtowerrpc/watchtower_services_pb.rb
Normal file
28
lib/grpc_services/watchtowerrpc/watchtower_services_pb.rb
Normal file
@@ -0,0 +1,28 @@
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# Source: watchtowerrpc/watchtower.proto for package 'watchtowerrpc'
|
||||
|
||||
require 'grpc'
|
||||
require 'watchtowerrpc/watchtower_pb'
|
||||
|
||||
module Watchtowerrpc
|
||||
module Watchtower
|
||||
# Watchtower is a service that grants access to the watchtower server
|
||||
# functionality of the daemon.
|
||||
class Service
|
||||
|
||||
include GRPC::GenericService
|
||||
|
||||
self.marshal_class_method = :encode
|
||||
self.unmarshal_class_method = :decode
|
||||
self.service_name = 'watchtowerrpc.Watchtower'
|
||||
|
||||
# lncli: tower info
|
||||
# GetInfo returns general information concerning the companion watchtower
|
||||
# including its public key and URIs where the server is currently
|
||||
# listening for clients.
|
||||
rpc :GetInfo, GetInfoRequest, GetInfoResponse
|
||||
end
|
||||
|
||||
Stub = Service.rpc_stub_class
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user