-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
multi: async grpc lnmd+lndmd, update tests
- Loading branch information
1 parent
a7466c5
commit 92a780a
Showing
15 changed files
with
932 additions
and
461 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
syntax = "proto3"; | ||
|
||
option objc_class_prefix = "MNG"; | ||
|
||
package managerpc; | ||
|
||
// blah. | ||
service Mangager { | ||
// blah. | ||
rpc RunningServices(RunningServicesRequest) returns (RunningServicesResponse) {} | ||
} | ||
|
||
// blah. | ||
message RunningServicesRequest { | ||
} | ||
|
||
// blah. | ||
message RunningServicesResponse { | ||
repeated RunningService services = 1; | ||
} | ||
|
||
// blah. | ||
message RunningService { | ||
string name = 1; | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! | ||
"""Client and server classes corresponding to protobuf-defined services.""" | ||
import grpc | ||
|
||
from lndmanage.grpc_compiled import manager_pb2 as manager__pb2 | ||
|
||
|
||
class MangagerStub(object): | ||
"""blah. | ||
""" | ||
|
||
def __init__(self, channel): | ||
"""Constructor. | ||
Args: | ||
channel: A grpc.Channel. | ||
""" | ||
self.RunningServices = channel.unary_unary( | ||
'/managerpc.Mangager/RunningServices', | ||
request_serializer=manager__pb2.RunningServicesRequest.SerializeToString, | ||
response_deserializer=manager__pb2.RunningServicesResponse.FromString, | ||
) | ||
|
||
|
||
class MangagerServicer(object): | ||
"""blah. | ||
""" | ||
|
||
def RunningServices(self, request, context): | ||
"""blah. | ||
""" | ||
context.set_code(grpc.StatusCode.UNIMPLEMENTED) | ||
context.set_details('Method not implemented!') | ||
raise NotImplementedError('Method not implemented!') | ||
|
||
|
||
def add_MangagerServicer_to_server(servicer, server): | ||
rpc_method_handlers = { | ||
'RunningServices': grpc.unary_unary_rpc_method_handler( | ||
servicer.RunningServices, | ||
request_deserializer=manager__pb2.RunningServicesRequest.FromString, | ||
response_serializer=manager__pb2.RunningServicesResponse.SerializeToString, | ||
), | ||
} | ||
generic_handler = grpc.method_handlers_generic_handler( | ||
'managerpc.Mangager', rpc_method_handlers) | ||
server.add_generic_rpc_handlers((generic_handler,)) | ||
|
||
|
||
# This class is part of an EXPERIMENTAL API. | ||
class Mangager(object): | ||
"""blah. | ||
""" | ||
|
||
@staticmethod | ||
def RunningServices(request, | ||
target, | ||
options=(), | ||
channel_credentials=None, | ||
call_credentials=None, | ||
insecure=False, | ||
compression=None, | ||
wait_for_ready=None, | ||
timeout=None, | ||
metadata=None): | ||
return grpc.experimental.unary_unary(request, target, '/managerpc.Mangager/RunningServices', | ||
manager__pb2.RunningServicesRequest.SerializeToString, | ||
manager__pb2.RunningServicesResponse.FromString, | ||
options, channel_credentials, | ||
insecure, call_credentials, compression, wait_for_ready, timeout, metadata) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.