forked from jack-dinsmore/mnist-server-grpc
-
Notifications
You must be signed in to change notification settings - Fork 1
/
server_tools_pb2_grpc.py
97 lines (84 loc) · 3.75 KB
/
server_tools_pb2_grpc.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
import grpc
import server_tools_pb2 as server__tools__pb2
class MnistServerStub(object):
# missing associated documentation comment in .proto file
pass
def __init__(self, channel):
"""Constructor.
Args:
channel: A grpc.Channel.
"""
self.StartJobWait = channel.unary_unary(
'/helloworld.MnistServer/StartJobWait',
request_serializer=server__tools__pb2.DataMessage.SerializeToString,
response_deserializer=server__tools__pb2.PredictionMessage.FromString,
)
self.StartJobNoWait = channel.unary_unary(
'/helloworld.MnistServer/StartJobNoWait',
request_serializer=server__tools__pb2.DataMessage.SerializeToString,
response_deserializer=server__tools__pb2.IDMessage.FromString,
)
self.ProbeJob = channel.unary_unary(
'/helloworld.MnistServer/ProbeJob',
request_serializer=server__tools__pb2.IDMessage.SerializeToString,
response_deserializer=server__tools__pb2.PredictionMessage.FromString,
)
self.RequestClientID = channel.unary_unary(
'/helloworld.MnistServer/RequestClientID',
request_serializer=server__tools__pb2.NullParam.SerializeToString,
response_deserializer=server__tools__pb2.IDMessage.FromString,
)
class MnistServerServicer(object):
# missing associated documentation comment in .proto file
pass
def StartJobWait(self, request, context):
# missing associated documentation comment in .proto file
pass
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def StartJobNoWait(self, request, context):
# missing associated documentation comment in .proto file
pass
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def ProbeJob(self, request, context):
# missing associated documentation comment in .proto file
pass
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def RequestClientID(self, request, context):
# missing associated documentation comment in .proto file
pass
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def add_MnistServerServicer_to_server(servicer, server):
rpc_method_handlers = {
'StartJobWait': grpc.unary_unary_rpc_method_handler(
servicer.StartJobWait,
request_deserializer=server__tools__pb2.DataMessage.FromString,
response_serializer=server__tools__pb2.PredictionMessage.SerializeToString,
),
'StartJobNoWait': grpc.unary_unary_rpc_method_handler(
servicer.StartJobNoWait,
request_deserializer=server__tools__pb2.DataMessage.FromString,
response_serializer=server__tools__pb2.IDMessage.SerializeToString,
),
'ProbeJob': grpc.unary_unary_rpc_method_handler(
servicer.ProbeJob,
request_deserializer=server__tools__pb2.IDMessage.FromString,
response_serializer=server__tools__pb2.PredictionMessage.SerializeToString,
),
'RequestClientID': grpc.unary_unary_rpc_method_handler(
servicer.RequestClientID,
request_deserializer=server__tools__pb2.NullParam.FromString,
response_serializer=server__tools__pb2.IDMessage.SerializeToString,
),
}
generic_handler = grpc.method_handlers_generic_handler(
'helloworld.MnistServer', rpc_method_handlers)
server.add_generic_rpc_handlers((generic_handler,))