@@ -19,15 +19,15 @@ def __init__(self, channel):
1919 channel: A grpc.Channel.
2020 """
2121 self .AccumulateFn = channel .stream_stream (
22- ' /accumulator.v1.Accumulator/AccumulateFn' ,
23- request_serializer = accumulator__pb2 .AccumulatorRequest .SerializeToString ,
24- response_deserializer = accumulator__pb2 .AccumulatorResponse .FromString ,
25- )
22+ " /accumulator.v1.Accumulator/AccumulateFn" ,
23+ request_serializer = accumulator__pb2 .AccumulatorRequest .SerializeToString ,
24+ response_deserializer = accumulator__pb2 .AccumulatorResponse .FromString ,
25+ )
2626 self .IsReady = channel .unary_unary (
27- ' /accumulator.v1.Accumulator/IsReady' ,
28- request_serializer = google_dot_protobuf_dot_empty__pb2 .Empty .SerializeToString ,
29- response_deserializer = accumulator__pb2 .ReadyResponse .FromString ,
30- )
27+ " /accumulator.v1.Accumulator/IsReady" ,
28+ request_serializer = google_dot_protobuf_dot_empty__pb2 .Empty .SerializeToString ,
29+ response_deserializer = accumulator__pb2 .ReadyResponse .FromString ,
30+ )
3131
3232
3333class AccumulatorServicer (object ):
@@ -37,75 +37,98 @@ class AccumulatorServicer(object):
3737 """
3838
3939 def AccumulateFn (self , request_iterator , context ):
40- """AccumulateFn applies a accumulate function to a request stream.
41- """
40+ """AccumulateFn applies a accumulate function to a request stream."""
4241 context .set_code (grpc .StatusCode .UNIMPLEMENTED )
43- context .set_details (' Method not implemented!' )
44- raise NotImplementedError (' Method not implemented!' )
42+ context .set_details (" Method not implemented!" )
43+ raise NotImplementedError (" Method not implemented!" )
4544
4645 def IsReady (self , request , context ):
47- """IsReady is the heartbeat endpoint for gRPC.
48- """
46+ """IsReady is the heartbeat endpoint for gRPC."""
4947 context .set_code (grpc .StatusCode .UNIMPLEMENTED )
50- context .set_details (' Method not implemented!' )
51- raise NotImplementedError (' Method not implemented!' )
48+ context .set_details (" Method not implemented!" )
49+ raise NotImplementedError (" Method not implemented!" )
5250
5351
5452def add_AccumulatorServicer_to_server (servicer , server ):
5553 rpc_method_handlers = {
56- ' AccumulateFn' : grpc .stream_stream_rpc_method_handler (
57- servicer .AccumulateFn ,
58- request_deserializer = accumulator__pb2 .AccumulatorRequest .FromString ,
59- response_serializer = accumulator__pb2 .AccumulatorResponse .SerializeToString ,
60- ),
61- ' IsReady' : grpc .unary_unary_rpc_method_handler (
62- servicer .IsReady ,
63- request_deserializer = google_dot_protobuf_dot_empty__pb2 .Empty .FromString ,
64- response_serializer = accumulator__pb2 .ReadyResponse .SerializeToString ,
65- ),
54+ " AccumulateFn" : grpc .stream_stream_rpc_method_handler (
55+ servicer .AccumulateFn ,
56+ request_deserializer = accumulator__pb2 .AccumulatorRequest .FromString ,
57+ response_serializer = accumulator__pb2 .AccumulatorResponse .SerializeToString ,
58+ ),
59+ " IsReady" : grpc .unary_unary_rpc_method_handler (
60+ servicer .IsReady ,
61+ request_deserializer = google_dot_protobuf_dot_empty__pb2 .Empty .FromString ,
62+ response_serializer = accumulator__pb2 .ReadyResponse .SerializeToString ,
63+ ),
6664 }
6765 generic_handler = grpc .method_handlers_generic_handler (
68- 'accumulator.v1.Accumulator' , rpc_method_handlers )
66+ "accumulator.v1.Accumulator" , rpc_method_handlers
67+ )
6968 server .add_generic_rpc_handlers ((generic_handler ,))
7069
7170
72- # This class is part of an EXPERIMENTAL API.
71+ # This class is part of an EXPERIMENTAL API.
7372class Accumulator (object ):
7473 """AccumulatorWindow describes a special kind of SessionWindow (similar to Global Window) where output should
7574 always have monotonically increasing WM but it can be manipulated through event-time by reordering the messages.
7675 NOTE: Quite powerful, should not be abused; it can cause stalling of pipelines and leaks
7776 """
7877
7978 @staticmethod
80- def AccumulateFn (request_iterator ,
79+ def AccumulateFn (
80+ request_iterator ,
81+ target ,
82+ options = (),
83+ channel_credentials = None ,
84+ call_credentials = None ,
85+ insecure = False ,
86+ compression = None ,
87+ wait_for_ready = None ,
88+ timeout = None ,
89+ metadata = None ,
90+ ):
91+ return grpc .experimental .stream_stream (
92+ request_iterator ,
8193 target ,
82- options = (),
83- channel_credentials = None ,
84- call_credentials = None ,
85- insecure = False ,
86- compression = None ,
87- wait_for_ready = None ,
88- timeout = None ,
89- metadata = None ):
90- return grpc .experimental .stream_stream (request_iterator , target , '/accumulator.v1.Accumulator/AccumulateFn' ,
94+ "/accumulator.v1.Accumulator/AccumulateFn" ,
9195 accumulator__pb2 .AccumulatorRequest .SerializeToString ,
9296 accumulator__pb2 .AccumulatorResponse .FromString ,
93- options , channel_credentials ,
94- insecure , call_credentials , compression , wait_for_ready , timeout , metadata )
97+ options ,
98+ channel_credentials ,
99+ insecure ,
100+ call_credentials ,
101+ compression ,
102+ wait_for_ready ,
103+ timeout ,
104+ metadata ,
105+ )
95106
96107 @staticmethod
97- def IsReady (request ,
108+ def IsReady (
109+ request ,
110+ target ,
111+ options = (),
112+ channel_credentials = None ,
113+ call_credentials = None ,
114+ insecure = False ,
115+ compression = None ,
116+ wait_for_ready = None ,
117+ timeout = None ,
118+ metadata = None ,
119+ ):
120+ return grpc .experimental .unary_unary (
121+ request ,
98122 target ,
99- options = (),
100- channel_credentials = None ,
101- call_credentials = None ,
102- insecure = False ,
103- compression = None ,
104- wait_for_ready = None ,
105- timeout = None ,
106- metadata = None ):
107- return grpc .experimental .unary_unary (request , target , '/accumulator.v1.Accumulator/IsReady' ,
123+ "/accumulator.v1.Accumulator/IsReady" ,
108124 google_dot_protobuf_dot_empty__pb2 .Empty .SerializeToString ,
109125 accumulator__pb2 .ReadyResponse .FromString ,
110- options , channel_credentials ,
111- insecure , call_credentials , compression , wait_for_ready , timeout , metadata )
126+ options ,
127+ channel_credentials ,
128+ insecure ,
129+ call_credentials ,
130+ compression ,
131+ wait_for_ready ,
132+ timeout ,
133+ metadata ,
134+ )
0 commit comments