public override async Task <Protocol.FlightInfo> GetFlightInfo(Protocol.FlightDescriptor request, ServerCallContext context) { var flightDescriptor = new FlightDescriptor(request); var flightInfo = await _flightServer.GetFlightInfo(flightDescriptor, context).ConfigureAwait(false); return(flightInfo.ToProtocol()); }
internal FlightDescriptor(Protocol.FlightDescriptor flightDescriptor) { if (flightDescriptor.Type != Protocol.FlightDescriptor.Types.DescriptorType.Cmd && flightDescriptor.Type != Protocol.FlightDescriptor.Types.DescriptorType.Path) { throw new NotSupportedException(); } _flightDescriptor = flightDescriptor; }
private FlightDescriptor(ByteString command) { _flightDescriptor = new Protocol.FlightDescriptor() { Cmd = command, Type = Protocol.FlightDescriptor.Types.DescriptorType.Cmd }; }
public override async Task <SchemaResult> GetSchema(Protocol.FlightDescriptor request, ServerCallContext context) { var flightDescriptor = new FlightDescriptor(request); var schema = await _flightServer.GetSchema(flightDescriptor, context).ConfigureAwait(false); return(new SchemaResult() { Schema = SchemaWriter.SerializeSchema(schema) }); }
private FlightDescriptor(params string[] paths) { _flightDescriptor = new Protocol.FlightDescriptor() { Type = Protocol.FlightDescriptor.Types.DescriptorType.Path }; foreach (var path in paths) { _flightDescriptor.Path.Add(path); } }