| 26 | |
| 27 | |
| 28 | class ExampleServer(flight.FlightServerBase): |
| 29 | simple_info = flight.FlightInfo( |
| 30 | pyarrow.schema([("a", "int32")]), |
| 31 | flight.FlightDescriptor.for_command(b"simple"), |
| 32 | [] |
| 33 | ) |
| 34 | |
| 35 | def get_flight_info(self, context, descriptor): |
| 36 | if descriptor.command == b"simple": |
| 37 | return self.simple_info |
| 38 | elif descriptor.command == b"unknown": |
| 39 | raise NotImplementedError("Unknown command") |
| 40 | |
| 41 | raise NotImplementedError("Unknown descriptor") |
| 42 | |
| 43 | |
| 44 | def async_or_skip(client): |