MCPcopy Create free account
hub / github.com/apache/arrow / GetInfoFlightServer

Class GetInfoFlightServer

python/pyarrow/tests/test_flight.py:285–309  ·  view source on GitHub ↗

A Flight server that tests GetFlightInfo.

Source from the content-addressed store, hash-verified

283
284
285class GetInfoFlightServer(FlightServerBase):
286 """A Flight server that tests GetFlightInfo."""
287
288 def get_flight_info(self, context, descriptor):
289 return flight.FlightInfo(
290 pa.schema([('a', pa.int32())]),
291 descriptor,
292 [
293 flight.FlightEndpoint(b'', ['grpc://test']),
294 flight.FlightEndpoint(
295 b'',
296 [flight.Location.for_grpc_tcp('localhost', 5005)],
297 pa.scalar("2023-04-05T12:34:56.789012345").cast(pa.timestamp("ns")),
298 "endpoint app metadata"
299 ),
300 ],
301 1,
302 42,
303 True,
304 "info app metadata"
305 )
306
307 def get_schema(self, context, descriptor):
308 info = self.get_flight_info(context, descriptor)
309 return flight.SchemaResult(info.schema)
310
311
312class ListActionsFlightServer(FlightServerBase):

Callers 3

test_flight_get_infoFunction · 0.85
test_flight_get_schemaFunction · 0.85
test_get_portFunction · 0.85

Calls

no outgoing calls

Tested by 3

test_flight_get_infoFunction · 0.68
test_flight_get_schemaFunction · 0.68
test_get_portFunction · 0.68