@@ -53,6 +53,9 @@ def __init__(self, logger: SystemLoggerInterface,
5353 else :
5454 v_str = drucker_pb2 .EnumVersionInfo .Name (version )
5555
56+ self .__metadata = [('x-rekcurd-application-name' , app ),
57+ ('x-rekcurd-sevice-level' , env ),
58+ ('x-rekcurd-grpc-version' , v_str )]
5659 if host is None :
5760 self .__change_domain_app_env (domain , app , env , v_str )
5861 else :
@@ -88,70 +91,70 @@ def run_predict_string_string(self, input, option="{}"):
8891 request = drucker_pb2 .StringInput ()
8992 request .input = input
9093 request .option .val = option
91- response = self .stub .Predict_String_String (request )
94+ response = self .stub .Predict_String_String (request , metadata = self . __metadata )
9295 return response
9396
9497 @error_handling (drucker_pb2 .BytesOutput ())
9598 def run_predict_string_bytes (self , input , option = "{}" ):
9699 request = drucker_pb2 .StringInput ()
97100 request .input = input
98101 request .option .val = option
99- response = self .stub .Predict_String_Bytes (request )
102+ response = self .stub .Predict_String_Bytes (request , metadata = self . __metadata )
100103 return response
101104
102105 @error_handling (drucker_pb2 .ArrIntOutput ())
103106 def run_predict_string_arrint (self , input , option = "{}" ):
104107 request = drucker_pb2 .StringInput ()
105108 request .input = input
106109 request .option .val = option
107- response = self .stub .Predict_String_ArrInt (request )
110+ response = self .stub .Predict_String_ArrInt (request , metadata = self . __metadata )
108111 return response
109112
110113 @error_handling (drucker_pb2 .ArrFloatOutput ())
111114 def run_predict_string_arrfloat (self , input , option = "{}" ):
112115 request = drucker_pb2 .StringInput ()
113116 request .input = input
114117 request .option .val = option
115- response = self .stub .Predict_String_ArrFloat (request )
118+ response = self .stub .Predict_String_ArrFloat (request , metadata = self . __metadata )
116119 return response
117120
118121 @error_handling (drucker_pb2 .ArrStringOutput ())
119122 def run_predict_string_arrstring (self , input , option = "{}" ):
120123 request = drucker_pb2 .StringInput ()
121124 request .input = input
122125 request .option .val = option
123- response = self .stub .Predict_String_ArrString (request )
126+ response = self .stub .Predict_String_ArrString (request , metadata = self . __metadata )
124127 return response
125128
126129
127130 @error_handling (drucker_pb2 .StringOutput ())
128131 def run_predict_bytes_string (self , input , option = "{}" ):
129132 request_iterator = self .__byte_input_request (input , option )
130- response = self .stub .Predict_Bytes_String (request_iterator )
133+ response = self .stub .Predict_Bytes_String (request_iterator , metadata = self . __metadata )
131134 return response
132135
133136 @error_handling (drucker_pb2 .BytesOutput ())
134137 def run_predict_bytes_bytes (self , input , option = "{}" ):
135138 request_iterator = self .__byte_input_request (input , option )
136- response = self .stub .Predict_Bytes_Bytes (request_iterator )
139+ response = self .stub .Predict_Bytes_Bytes (request_iterator , metadata = self . __metadata )
137140 return response
138141
139142 @error_handling (drucker_pb2 .ArrIntOutput ())
140143 def run_predict_bytes_arrint (self , input , option = "{}" ):
141144 request_iterator = self .__byte_input_request (input , option )
142- response = self .stub .Predict_Bytes_ArrInt (request_iterator )
145+ response = self .stub .Predict_Bytes_ArrInt (request_iterator , metadata = self . __metadata )
143146 return response
144147
145148 @error_handling (drucker_pb2 .ArrFloatOutput ())
146149 def run_predict_bytes_arrfloat (self , input , option = "{}" ):
147150 request_iterator = self .__byte_input_request (input , option )
148- response = self .stub .Predict_Bytes_ArrFloat (request_iterator )
151+ response = self .stub .Predict_Bytes_ArrFloat (request_iterator , metadata = self . __metadata )
149152 return response
150153
151154 @error_handling (drucker_pb2 .ArrStringOutput ())
152155 def run_predict_bytes_arrstring (self , input , option = "{}" ):
153156 request_iterator = self .__byte_input_request (input , option )
154- response = self .stub .Predict_Bytes_ArrString (request_iterator )
157+ response = self .stub .Predict_Bytes_ArrString (request_iterator , metadata = self . __metadata )
155158 return response
156159
157160
@@ -160,39 +163,39 @@ def run_predict_arrint_string(self, input, option="{}"):
160163 request = drucker_pb2 .ArrIntInput ()
161164 request .input .extend (input )
162165 request .option .val = option
163- response = self .stub .Predict_ArrInt_String (request )
166+ response = self .stub .Predict_ArrInt_String (request , metadata = self . __metadata )
164167 return response
165168
166169 @error_handling (drucker_pb2 .BytesOutput ())
167170 def run_predict_arrint_bytes (self , input , option = "{}" ):
168171 request = drucker_pb2 .ArrIntInput ()
169172 request .input .extend (input )
170173 request .option .val = option
171- response = self .stub .Predict_ArrInt_Bytes (request )
174+ response = self .stub .Predict_ArrInt_Bytes (request , metadata = self . __metadata )
172175 return response
173176
174177 @error_handling (drucker_pb2 .ArrIntOutput ())
175178 def run_predict_arrint_arrint (self , input , option = "{}" ):
176179 request = drucker_pb2 .ArrIntInput ()
177180 request .input .extend (input )
178181 request .option .val = option
179- response = self .stub .Predict_ArrInt_ArrInt (request )
182+ response = self .stub .Predict_ArrInt_ArrInt (request , metadata = self . __metadata )
180183 return response
181184
182185 @error_handling (drucker_pb2 .ArrFloatOutput ())
183186 def run_predict_arrint_arrfloat (self , input , option = "{}" ):
184187 request = drucker_pb2 .ArrIntInput ()
185188 request .input .extend (input )
186189 request .option .val = option
187- response = self .stub .Predict_ArrInt_ArrFloat (request )
190+ response = self .stub .Predict_ArrInt_ArrFloat (request , metadata = self . __metadata )
188191 return response
189192
190193 @error_handling (drucker_pb2 .ArrStringOutput ())
191194 def run_predict_arrint_arrstring (self , input , option = "{}" ):
192195 request = drucker_pb2 .ArrIntInput ()
193196 request .input .extend (input )
194197 request .option .val = option
195- response = self .stub .Predict_ArrInt_ArrString (request )
198+ response = self .stub .Predict_ArrInt_ArrString (request , metadata = self . __metadata )
196199 return response
197200
198201
@@ -201,39 +204,39 @@ def run_predict_arrfloat_string(self, input, option="{}"):
201204 request = drucker_pb2 .ArrFloatInput ()
202205 request .input .extend (input )
203206 request .option .val = option
204- response = self .stub .Predict_ArrFloat_String (request )
207+ response = self .stub .Predict_ArrFloat_String (request , metadata = self . __metadata )
205208 return response
206209
207210 @error_handling (drucker_pb2 .BytesOutput ())
208211 def run_predict_arrfloat_bytes (self , input , option = "{}" ):
209212 request = drucker_pb2 .ArrFloatInput ()
210213 request .input .extend (input )
211214 request .option .val = option
212- response = self .stub .Predict_ArrFloat_Bytes (request )
215+ response = self .stub .Predict_ArrFloat_Bytes (request , metadata = self . __metadata )
213216 return response
214217
215218 @error_handling (drucker_pb2 .ArrIntOutput ())
216219 def run_predict_arrfloat_arrint (self , input , option = "{}" ):
217220 request = drucker_pb2 .ArrFloatInput ()
218221 request .input .extend (input )
219222 request .option .val = option
220- response = self .stub .Predict_ArrFloat_ArrInt (request )
223+ response = self .stub .Predict_ArrFloat_ArrInt (request , metadata = self . __metadata )
221224 return response
222225
223226 @error_handling (drucker_pb2 .ArrFloatOutput ())
224227 def run_predict_arrfloat_arrfloat (self , input , option = "{}" ):
225228 request = drucker_pb2 .ArrFloatInput ()
226229 request .input .extend (input )
227230 request .option .val = option
228- response = self .stub .Predict_ArrFloat_ArrFloat (request )
231+ response = self .stub .Predict_ArrFloat_ArrFloat (request , metadata = self . __metadata )
229232 return response
230233
231234 @error_handling (drucker_pb2 .ArrStringOutput ())
232235 def run_predict_arrfloat_arrstring (self , input , option = "{}" ):
233236 request = drucker_pb2 .ArrFloatInput ()
234237 request .input .extend (input )
235238 request .option .val = option
236- response = self .stub .Predict_ArrFloat_ArrString (request )
239+ response = self .stub .Predict_ArrFloat_ArrString (request , metadata = self . __metadata )
237240 return response
238241
239242
@@ -242,37 +245,37 @@ def run_predict_arrstring_string(self, input, option="{}"):
242245 request = drucker_pb2 .ArrStringInput ()
243246 request .input .extend (input )
244247 request .option .val = option
245- response = self .stub .Predict_ArrString_String (request )
248+ response = self .stub .Predict_ArrString_String (request , metadata = self . __metadata )
246249 return response
247250
248251 @error_handling (drucker_pb2 .BytesOutput ())
249252 def run_predict_arrstring_bytes (self , input , option = "{}" ):
250253 request = drucker_pb2 .ArrStringInput ()
251254 request .input .extend (input )
252255 request .option .val = option
253- response = self .stub .Predict_ArrString_Bytes (request )
256+ response = self .stub .Predict_ArrString_Bytes (request , metadata = self . __metadata )
254257 return response
255258
256259 @error_handling (drucker_pb2 .ArrIntOutput ())
257260 def run_predict_arrstring_arrint (self , input , option = "{}" ):
258261 request = drucker_pb2 .ArrStringInput ()
259262 request .input .extend (input )
260263 request .option .val = option
261- response = self .stub .Predict_ArrString_ArrInt (request )
264+ response = self .stub .Predict_ArrString_ArrInt (request , metadata = self . __metadata )
262265 return response
263266
264267 @error_handling (drucker_pb2 .ArrFloatOutput ())
265268 def run_predict_arrstring_arrfloat (self , input , option = "{}" ):
266269 request = drucker_pb2 .ArrStringInput ()
267270 request .input .extend (input )
268271 request .option .val = option
269- response = self .stub .Predict_ArrString_ArrFloat (request )
272+ response = self .stub .Predict_ArrString_ArrFloat (request , metadata = self . __metadata )
270273 return response
271274
272275 @error_handling (drucker_pb2 .ArrStringOutput ())
273276 def run_predict_arrstring_arrstring (self , input , option = "{}" ):
274277 request = drucker_pb2 .ArrStringInput ()
275278 request .input .extend (input )
276279 request .option .val = option
277- response = self .stub .Predict_ArrString_ArrString (request )
280+ response = self .stub .Predict_ArrString_ArrString (request , metadata = self . __metadata )
278281 return response
0 commit comments