1 // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
7 grpc "google.golang.org/grpc"
8 codes "google.golang.org/grpc/codes"
9 status "google.golang.org/grpc/status"
12 // This is a compile-time assertion to ensure that this generated file
13 // is compatible with the grpc package it is being compiled against.
14 const _ = grpc.SupportPackageIsVersion7
16 // FlightServiceClient is the client API for FlightService service.
18 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
19 type FlightServiceClient interface {
21 // Handshake between client and server. Depending on the server, the
22 // handshake may be required to determine the token that should be used for
23 // future operations. Both request and response are streams to allow multiple
24 // round-trips depending on auth mechanism.
25 Handshake(ctx context.Context, opts ...grpc.CallOption) (FlightService_HandshakeClient, error)
27 // Get a list of available streams given a particular criteria. Most flight
28 // services will expose one or more streams that are readily available for
29 // retrieval. This api allows listing the streams available for
30 // consumption. A user can also provide a criteria. The criteria can limit
31 // the subset of streams that can be listed via this interface. Each flight
32 // service allows its own definition of how to consume criteria.
33 ListFlights(ctx context.Context, in *Criteria, opts ...grpc.CallOption) (FlightService_ListFlightsClient, error)
35 // For a given FlightDescriptor, get information about how the flight can be
36 // consumed. This is a useful interface if the consumer of the interface
37 // already can identify the specific flight to consume. This interface can
38 // also allow a consumer to generate a flight stream through a specified
39 // descriptor. For example, a flight descriptor might be something that
40 // includes a SQL statement or a Pickled Python operation that will be
41 // executed. In those cases, the descriptor will not be previously available
42 // within the list of available streams provided by ListFlights but will be
43 // available for consumption for the duration defined by the specific flight
45 GetFlightInfo(ctx context.Context, in *FlightDescriptor, opts ...grpc.CallOption) (*FlightInfo, error)
47 // For a given FlightDescriptor, get the Schema as described in Schema.fbs::Schema
48 // This is used when a consumer needs the Schema of flight stream. Similar to
49 // GetFlightInfo this interface may generate a new flight that was not previously
50 // available in ListFlights.
51 GetSchema(ctx context.Context, in *FlightDescriptor, opts ...grpc.CallOption) (*SchemaResult, error)
53 // Retrieve a single stream associated with a particular descriptor
54 // associated with the referenced ticket. A Flight can be composed of one or
55 // more streams where each stream can be retrieved using a separate opaque
56 // ticket that the flight service uses for managing a collection of streams.
57 DoGet(ctx context.Context, in *Ticket, opts ...grpc.CallOption) (FlightService_DoGetClient, error)
59 // Push a stream to the flight service associated with a particular
60 // flight stream. This allows a client of a flight service to upload a stream
61 // of data. Depending on the particular flight service, a client consumer
62 // could be allowed to upload a single stream per descriptor or an unlimited
63 // number. In the latter, the service might implement a 'seal' action that
64 // can be applied to a descriptor once all streams are uploaded.
65 DoPut(ctx context.Context, opts ...grpc.CallOption) (FlightService_DoPutClient, error)
67 // Open a bidirectional data channel for a given descriptor. This
68 // allows clients to send and receive arbitrary Arrow data and
69 // application-specific metadata in a single logical stream. In
70 // contrast to DoGet/DoPut, this is more suited for clients
71 // offloading computation (rather than storage) to a Flight service.
72 DoExchange(ctx context.Context, opts ...grpc.CallOption) (FlightService_DoExchangeClient, error)
74 // Flight services can support an arbitrary number of simple actions in
75 // addition to the possible ListFlights, GetFlightInfo, DoGet, DoPut
76 // operations that are potentially available. DoAction allows a flight client
77 // to do a specific action against a flight service. An action includes
78 // opaque request and response objects that are specific to the type action
80 DoAction(ctx context.Context, in *Action, opts ...grpc.CallOption) (FlightService_DoActionClient, error)
82 // A flight service exposes all of the available action types that it has
83 // along with descriptions. This allows different flight consumers to
84 // understand the capabilities of the flight service.
85 ListActions(ctx context.Context, in *Empty, opts ...grpc.CallOption) (FlightService_ListActionsClient, error)
88 type flightServiceClient struct {
89 cc grpc.ClientConnInterface
92 func NewFlightServiceClient(cc grpc.ClientConnInterface) FlightServiceClient {
93 return &flightServiceClient{cc}
96 var flightServiceHandshakeStreamDesc = &grpc.StreamDesc{
97 StreamName: "Handshake",
102 func (c *flightServiceClient) Handshake(ctx context.Context, opts ...grpc.CallOption) (FlightService_HandshakeClient, error) {
103 stream, err := c.cc.NewStream(ctx, flightServiceHandshakeStreamDesc, "/arrow.flight.protocol.FlightService/Handshake", opts...)
107 x := &flightServiceHandshakeClient{stream}
111 type FlightService_HandshakeClient interface {
112 Send(*HandshakeRequest) error
113 Recv() (*HandshakeResponse, error)
117 type flightServiceHandshakeClient struct {
121 func (x *flightServiceHandshakeClient) Send(m *HandshakeRequest) error {
122 return x.ClientStream.SendMsg(m)
125 func (x *flightServiceHandshakeClient) Recv() (*HandshakeResponse, error) {
126 m := new(HandshakeResponse)
127 if err := x.ClientStream.RecvMsg(m); err != nil {
133 var flightServiceListFlightsStreamDesc = &grpc.StreamDesc{
134 StreamName: "ListFlights",
138 func (c *flightServiceClient) ListFlights(ctx context.Context, in *Criteria, opts ...grpc.CallOption) (FlightService_ListFlightsClient, error) {
139 stream, err := c.cc.NewStream(ctx, flightServiceListFlightsStreamDesc, "/arrow.flight.protocol.FlightService/ListFlights", opts...)
143 x := &flightServiceListFlightsClient{stream}
144 if err := x.ClientStream.SendMsg(in); err != nil {
147 if err := x.ClientStream.CloseSend(); err != nil {
153 type FlightService_ListFlightsClient interface {
154 Recv() (*FlightInfo, error)
158 type flightServiceListFlightsClient struct {
162 func (x *flightServiceListFlightsClient) Recv() (*FlightInfo, error) {
164 if err := x.ClientStream.RecvMsg(m); err != nil {
170 var flightServiceGetFlightInfoStreamDesc = &grpc.StreamDesc{
171 StreamName: "GetFlightInfo",
174 func (c *flightServiceClient) GetFlightInfo(ctx context.Context, in *FlightDescriptor, opts ...grpc.CallOption) (*FlightInfo, error) {
175 out := new(FlightInfo)
176 err := c.cc.Invoke(ctx, "/arrow.flight.protocol.FlightService/GetFlightInfo", in, out, opts...)
183 var flightServiceGetSchemaStreamDesc = &grpc.StreamDesc{
184 StreamName: "GetSchema",
187 func (c *flightServiceClient) GetSchema(ctx context.Context, in *FlightDescriptor, opts ...grpc.CallOption) (*SchemaResult, error) {
188 out := new(SchemaResult)
189 err := c.cc.Invoke(ctx, "/arrow.flight.protocol.FlightService/GetSchema", in, out, opts...)
196 var flightServiceDoGetStreamDesc = &grpc.StreamDesc{
201 func (c *flightServiceClient) DoGet(ctx context.Context, in *Ticket, opts ...grpc.CallOption) (FlightService_DoGetClient, error) {
202 stream, err := c.cc.NewStream(ctx, flightServiceDoGetStreamDesc, "/arrow.flight.protocol.FlightService/DoGet", opts...)
206 x := &flightServiceDoGetClient{stream}
207 if err := x.ClientStream.SendMsg(in); err != nil {
210 if err := x.ClientStream.CloseSend(); err != nil {
216 type FlightService_DoGetClient interface {
217 Recv() (*FlightData, error)
221 type flightServiceDoGetClient struct {
225 func (x *flightServiceDoGetClient) Recv() (*FlightData, error) {
227 if err := x.ClientStream.RecvMsg(m); err != nil {
233 var flightServiceDoPutStreamDesc = &grpc.StreamDesc{
239 func (c *flightServiceClient) DoPut(ctx context.Context, opts ...grpc.CallOption) (FlightService_DoPutClient, error) {
240 stream, err := c.cc.NewStream(ctx, flightServiceDoPutStreamDesc, "/arrow.flight.protocol.FlightService/DoPut", opts...)
244 x := &flightServiceDoPutClient{stream}
248 type FlightService_DoPutClient interface {
249 Send(*FlightData) error
250 Recv() (*PutResult, error)
254 type flightServiceDoPutClient struct {
258 func (x *flightServiceDoPutClient) Send(m *FlightData) error {
259 return x.ClientStream.SendMsg(m)
262 func (x *flightServiceDoPutClient) Recv() (*PutResult, error) {
264 if err := x.ClientStream.RecvMsg(m); err != nil {
270 var flightServiceDoExchangeStreamDesc = &grpc.StreamDesc{
271 StreamName: "DoExchange",
276 func (c *flightServiceClient) DoExchange(ctx context.Context, opts ...grpc.CallOption) (FlightService_DoExchangeClient, error) {
277 stream, err := c.cc.NewStream(ctx, flightServiceDoExchangeStreamDesc, "/arrow.flight.protocol.FlightService/DoExchange", opts...)
281 x := &flightServiceDoExchangeClient{stream}
285 type FlightService_DoExchangeClient interface {
286 Send(*FlightData) error
287 Recv() (*FlightData, error)
291 type flightServiceDoExchangeClient struct {
295 func (x *flightServiceDoExchangeClient) Send(m *FlightData) error {
296 return x.ClientStream.SendMsg(m)
299 func (x *flightServiceDoExchangeClient) Recv() (*FlightData, error) {
301 if err := x.ClientStream.RecvMsg(m); err != nil {
307 var flightServiceDoActionStreamDesc = &grpc.StreamDesc{
308 StreamName: "DoAction",
312 func (c *flightServiceClient) DoAction(ctx context.Context, in *Action, opts ...grpc.CallOption) (FlightService_DoActionClient, error) {
313 stream, err := c.cc.NewStream(ctx, flightServiceDoActionStreamDesc, "/arrow.flight.protocol.FlightService/DoAction", opts...)
317 x := &flightServiceDoActionClient{stream}
318 if err := x.ClientStream.SendMsg(in); err != nil {
321 if err := x.ClientStream.CloseSend(); err != nil {
327 type FlightService_DoActionClient interface {
328 Recv() (*Result, error)
332 type flightServiceDoActionClient struct {
336 func (x *flightServiceDoActionClient) Recv() (*Result, error) {
338 if err := x.ClientStream.RecvMsg(m); err != nil {
344 var flightServiceListActionsStreamDesc = &grpc.StreamDesc{
345 StreamName: "ListActions",
349 func (c *flightServiceClient) ListActions(ctx context.Context, in *Empty, opts ...grpc.CallOption) (FlightService_ListActionsClient, error) {
350 stream, err := c.cc.NewStream(ctx, flightServiceListActionsStreamDesc, "/arrow.flight.protocol.FlightService/ListActions", opts...)
354 x := &flightServiceListActionsClient{stream}
355 if err := x.ClientStream.SendMsg(in); err != nil {
358 if err := x.ClientStream.CloseSend(); err != nil {
364 type FlightService_ListActionsClient interface {
365 Recv() (*ActionType, error)
369 type flightServiceListActionsClient struct {
373 func (x *flightServiceListActionsClient) Recv() (*ActionType, error) {
375 if err := x.ClientStream.RecvMsg(m); err != nil {
381 // FlightServiceService is the service API for FlightService service.
382 // Fields should be assigned to their respective handler implementations only before
383 // RegisterFlightServiceService is called. Any unassigned fields will result in the
384 // handler for that method returning an Unimplemented error.
385 type FlightServiceService struct {
387 // Handshake between client and server. Depending on the server, the
388 // handshake may be required to determine the token that should be used for
389 // future operations. Both request and response are streams to allow multiple
390 // round-trips depending on auth mechanism.
391 Handshake func(FlightService_HandshakeServer) error
393 // Get a list of available streams given a particular criteria. Most flight
394 // services will expose one or more streams that are readily available for
395 // retrieval. This api allows listing the streams available for
396 // consumption. A user can also provide a criteria. The criteria can limit
397 // the subset of streams that can be listed via this interface. Each flight
398 // service allows its own definition of how to consume criteria.
399 ListFlights func(*Criteria, FlightService_ListFlightsServer) error
401 // For a given FlightDescriptor, get information about how the flight can be
402 // consumed. This is a useful interface if the consumer of the interface
403 // already can identify the specific flight to consume. This interface can
404 // also allow a consumer to generate a flight stream through a specified
405 // descriptor. For example, a flight descriptor might be something that
406 // includes a SQL statement or a Pickled Python operation that will be
407 // executed. In those cases, the descriptor will not be previously available
408 // within the list of available streams provided by ListFlights but will be
409 // available for consumption for the duration defined by the specific flight
411 GetFlightInfo func(context.Context, *FlightDescriptor) (*FlightInfo, error)
413 // For a given FlightDescriptor, get the Schema as described in Schema.fbs::Schema
414 // This is used when a consumer needs the Schema of flight stream. Similar to
415 // GetFlightInfo this interface may generate a new flight that was not previously
416 // available in ListFlights.
417 GetSchema func(context.Context, *FlightDescriptor) (*SchemaResult, error)
419 // Retrieve a single stream associated with a particular descriptor
420 // associated with the referenced ticket. A Flight can be composed of one or
421 // more streams where each stream can be retrieved using a separate opaque
422 // ticket that the flight service uses for managing a collection of streams.
423 DoGet func(*Ticket, FlightService_DoGetServer) error
425 // Push a stream to the flight service associated with a particular
426 // flight stream. This allows a client of a flight service to upload a stream
427 // of data. Depending on the particular flight service, a client consumer
428 // could be allowed to upload a single stream per descriptor or an unlimited
429 // number. In the latter, the service might implement a 'seal' action that
430 // can be applied to a descriptor once all streams are uploaded.
431 DoPut func(FlightService_DoPutServer) error
433 // Open a bidirectional data channel for a given descriptor. This
434 // allows clients to send and receive arbitrary Arrow data and
435 // application-specific metadata in a single logical stream. In
436 // contrast to DoGet/DoPut, this is more suited for clients
437 // offloading computation (rather than storage) to a Flight service.
438 DoExchange func(FlightService_DoExchangeServer) error
440 // Flight services can support an arbitrary number of simple actions in
441 // addition to the possible ListFlights, GetFlightInfo, DoGet, DoPut
442 // operations that are potentially available. DoAction allows a flight client
443 // to do a specific action against a flight service. An action includes
444 // opaque request and response objects that are specific to the type action
446 DoAction func(*Action, FlightService_DoActionServer) error
448 // A flight service exposes all of the available action types that it has
449 // along with descriptions. This allows different flight consumers to
450 // understand the capabilities of the flight service.
451 ListActions func(*Empty, FlightService_ListActionsServer) error
454 func (s *FlightServiceService) handshake(_ interface{}, stream grpc.ServerStream) error {
455 return s.Handshake(&flightServiceHandshakeServer{stream})
457 func (s *FlightServiceService) listFlights(_ interface{}, stream grpc.ServerStream) error {
459 if err := stream.RecvMsg(m); err != nil {
462 return s.ListFlights(m, &flightServiceListFlightsServer{stream})
464 func (s *FlightServiceService) getFlightInfo(_ interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
465 in := new(FlightDescriptor)
466 if err := dec(in); err != nil {
469 if interceptor == nil {
470 return s.GetFlightInfo(ctx, in)
472 info := &grpc.UnaryServerInfo{
474 FullMethod: "/arrow.flight.protocol.FlightService/GetFlightInfo",
476 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
477 return s.GetFlightInfo(ctx, req.(*FlightDescriptor))
479 return interceptor(ctx, in, info, handler)
481 func (s *FlightServiceService) getSchema(_ interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
482 in := new(FlightDescriptor)
483 if err := dec(in); err != nil {
486 if interceptor == nil {
487 return s.GetSchema(ctx, in)
489 info := &grpc.UnaryServerInfo{
491 FullMethod: "/arrow.flight.protocol.FlightService/GetSchema",
493 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
494 return s.GetSchema(ctx, req.(*FlightDescriptor))
496 return interceptor(ctx, in, info, handler)
498 func (s *FlightServiceService) doGet(_ interface{}, stream grpc.ServerStream) error {
500 if err := stream.RecvMsg(m); err != nil {
503 return s.DoGet(m, &flightServiceDoGetServer{stream})
505 func (s *FlightServiceService) doPut(_ interface{}, stream grpc.ServerStream) error {
506 return s.DoPut(&flightServiceDoPutServer{stream})
508 func (s *FlightServiceService) doExchange(_ interface{}, stream grpc.ServerStream) error {
509 return s.DoExchange(&flightServiceDoExchangeServer{stream})
511 func (s *FlightServiceService) doAction(_ interface{}, stream grpc.ServerStream) error {
513 if err := stream.RecvMsg(m); err != nil {
516 return s.DoAction(m, &flightServiceDoActionServer{stream})
518 func (s *FlightServiceService) listActions(_ interface{}, stream grpc.ServerStream) error {
520 if err := stream.RecvMsg(m); err != nil {
523 return s.ListActions(m, &flightServiceListActionsServer{stream})
526 type FlightService_HandshakeServer interface {
527 Send(*HandshakeResponse) error
528 Recv() (*HandshakeRequest, error)
532 type flightServiceHandshakeServer struct {
536 func (x *flightServiceHandshakeServer) Send(m *HandshakeResponse) error {
537 return x.ServerStream.SendMsg(m)
540 func (x *flightServiceHandshakeServer) Recv() (*HandshakeRequest, error) {
541 m := new(HandshakeRequest)
542 if err := x.ServerStream.RecvMsg(m); err != nil {
548 type FlightService_ListFlightsServer interface {
549 Send(*FlightInfo) error
553 type flightServiceListFlightsServer struct {
557 func (x *flightServiceListFlightsServer) Send(m *FlightInfo) error {
558 return x.ServerStream.SendMsg(m)
561 type FlightService_DoGetServer interface {
562 Send(*FlightData) error
566 type flightServiceDoGetServer struct {
570 func (x *flightServiceDoGetServer) Send(m *FlightData) error {
571 return x.ServerStream.SendMsg(m)
574 type FlightService_DoPutServer interface {
575 Send(*PutResult) error
576 Recv() (*FlightData, error)
580 type flightServiceDoPutServer struct {
584 func (x *flightServiceDoPutServer) Send(m *PutResult) error {
585 return x.ServerStream.SendMsg(m)
588 func (x *flightServiceDoPutServer) Recv() (*FlightData, error) {
590 if err := x.ServerStream.RecvMsg(m); err != nil {
596 type FlightService_DoExchangeServer interface {
597 Send(*FlightData) error
598 Recv() (*FlightData, error)
602 type flightServiceDoExchangeServer struct {
606 func (x *flightServiceDoExchangeServer) Send(m *FlightData) error {
607 return x.ServerStream.SendMsg(m)
610 func (x *flightServiceDoExchangeServer) Recv() (*FlightData, error) {
612 if err := x.ServerStream.RecvMsg(m); err != nil {
618 type FlightService_DoActionServer interface {
623 type flightServiceDoActionServer struct {
627 func (x *flightServiceDoActionServer) Send(m *Result) error {
628 return x.ServerStream.SendMsg(m)
631 type FlightService_ListActionsServer interface {
632 Send(*ActionType) error
636 type flightServiceListActionsServer struct {
640 func (x *flightServiceListActionsServer) Send(m *ActionType) error {
641 return x.ServerStream.SendMsg(m)
644 // RegisterFlightServiceService registers a service implementation with a gRPC server.
645 func RegisterFlightServiceService(s grpc.ServiceRegistrar, srv *FlightServiceService) {
647 if srvCopy.Handshake == nil {
648 srvCopy.Handshake = func(FlightService_HandshakeServer) error {
649 return status.Errorf(codes.Unimplemented, "method Handshake not implemented")
652 if srvCopy.ListFlights == nil {
653 srvCopy.ListFlights = func(*Criteria, FlightService_ListFlightsServer) error {
654 return status.Errorf(codes.Unimplemented, "method ListFlights not implemented")
657 if srvCopy.GetFlightInfo == nil {
658 srvCopy.GetFlightInfo = func(context.Context, *FlightDescriptor) (*FlightInfo, error) {
659 return nil, status.Errorf(codes.Unimplemented, "method GetFlightInfo not implemented")
662 if srvCopy.GetSchema == nil {
663 srvCopy.GetSchema = func(context.Context, *FlightDescriptor) (*SchemaResult, error) {
664 return nil, status.Errorf(codes.Unimplemented, "method GetSchema not implemented")
667 if srvCopy.DoGet == nil {
668 srvCopy.DoGet = func(*Ticket, FlightService_DoGetServer) error {
669 return status.Errorf(codes.Unimplemented, "method DoGet not implemented")
672 if srvCopy.DoPut == nil {
673 srvCopy.DoPut = func(FlightService_DoPutServer) error {
674 return status.Errorf(codes.Unimplemented, "method DoPut not implemented")
677 if srvCopy.DoExchange == nil {
678 srvCopy.DoExchange = func(FlightService_DoExchangeServer) error {
679 return status.Errorf(codes.Unimplemented, "method DoExchange not implemented")
682 if srvCopy.DoAction == nil {
683 srvCopy.DoAction = func(*Action, FlightService_DoActionServer) error {
684 return status.Errorf(codes.Unimplemented, "method DoAction not implemented")
687 if srvCopy.ListActions == nil {
688 srvCopy.ListActions = func(*Empty, FlightService_ListActionsServer) error {
689 return status.Errorf(codes.Unimplemented, "method ListActions not implemented")
692 sd := grpc.ServiceDesc{
693 ServiceName: "arrow.flight.protocol.FlightService",
694 Methods: []grpc.MethodDesc{
696 MethodName: "GetFlightInfo",
697 Handler: srvCopy.getFlightInfo,
700 MethodName: "GetSchema",
701 Handler: srvCopy.getSchema,
704 Streams: []grpc.StreamDesc{
706 StreamName: "Handshake",
707 Handler: srvCopy.handshake,
712 StreamName: "ListFlights",
713 Handler: srvCopy.listFlights,
718 Handler: srvCopy.doGet,
723 Handler: srvCopy.doPut,
728 StreamName: "DoExchange",
729 Handler: srvCopy.doExchange,
734 StreamName: "DoAction",
735 Handler: srvCopy.doAction,
739 StreamName: "ListActions",
740 Handler: srvCopy.listActions,
744 Metadata: "Flight.proto",
747 s.RegisterService(&sd, nil)
750 // NewFlightServiceService creates a new FlightServiceService containing the
751 // implemented methods of the FlightService service in s. Any unimplemented
752 // methods will result in the gRPC server returning an UNIMPLEMENTED status to the client.
753 // This includes situations where the method handler is misspelled or has the wrong
754 // signature. For this reason, this function should be used with great care and
755 // is not recommended to be used by most users.
756 func NewFlightServiceService(s interface{}) *FlightServiceService {
757 ns := &FlightServiceService{}
758 if h, ok := s.(interface {
759 Handshake(FlightService_HandshakeServer) error
761 ns.Handshake = h.Handshake
763 if h, ok := s.(interface {
764 ListFlights(*Criteria, FlightService_ListFlightsServer) error
766 ns.ListFlights = h.ListFlights
768 if h, ok := s.(interface {
769 GetFlightInfo(context.Context, *FlightDescriptor) (*FlightInfo, error)
771 ns.GetFlightInfo = h.GetFlightInfo
773 if h, ok := s.(interface {
774 GetSchema(context.Context, *FlightDescriptor) (*SchemaResult, error)
776 ns.GetSchema = h.GetSchema
778 if h, ok := s.(interface {
779 DoGet(*Ticket, FlightService_DoGetServer) error
783 if h, ok := s.(interface {
784 DoPut(FlightService_DoPutServer) error
788 if h, ok := s.(interface {
789 DoExchange(FlightService_DoExchangeServer) error
791 ns.DoExchange = h.DoExchange
793 if h, ok := s.(interface {
794 DoAction(*Action, FlightService_DoActionServer) error
796 ns.DoAction = h.DoAction
798 if h, ok := s.(interface {
799 ListActions(*Empty, FlightService_ListActionsServer) error
801 ns.ListActions = h.ListActions
806 // UnstableFlightServiceService is the service API for FlightService service.
807 // New methods may be added to this interface if they are added to the service
808 // definition, which is not a backward-compatible change. For this reason,
809 // use of this type is not recommended.
810 type UnstableFlightServiceService interface {
812 // Handshake between client and server. Depending on the server, the
813 // handshake may be required to determine the token that should be used for
814 // future operations. Both request and response are streams to allow multiple
815 // round-trips depending on auth mechanism.
816 Handshake(FlightService_HandshakeServer) error
818 // Get a list of available streams given a particular criteria. Most flight
819 // services will expose one or more streams that are readily available for
820 // retrieval. This api allows listing the streams available for
821 // consumption. A user can also provide a criteria. The criteria can limit
822 // the subset of streams that can be listed via this interface. Each flight
823 // service allows its own definition of how to consume criteria.
824 ListFlights(*Criteria, FlightService_ListFlightsServer) error
826 // For a given FlightDescriptor, get information about how the flight can be
827 // consumed. This is a useful interface if the consumer of the interface
828 // already can identify the specific flight to consume. This interface can
829 // also allow a consumer to generate a flight stream through a specified
830 // descriptor. For example, a flight descriptor might be something that
831 // includes a SQL statement or a Pickled Python operation that will be
832 // executed. In those cases, the descriptor will not be previously available
833 // within the list of available streams provided by ListFlights but will be
834 // available for consumption for the duration defined by the specific flight
836 GetFlightInfo(context.Context, *FlightDescriptor) (*FlightInfo, error)
838 // For a given FlightDescriptor, get the Schema as described in Schema.fbs::Schema
839 // This is used when a consumer needs the Schema of flight stream. Similar to
840 // GetFlightInfo this interface may generate a new flight that was not previously
841 // available in ListFlights.
842 GetSchema(context.Context, *FlightDescriptor) (*SchemaResult, error)
844 // Retrieve a single stream associated with a particular descriptor
845 // associated with the referenced ticket. A Flight can be composed of one or
846 // more streams where each stream can be retrieved using a separate opaque
847 // ticket that the flight service uses for managing a collection of streams.
848 DoGet(*Ticket, FlightService_DoGetServer) error
850 // Push a stream to the flight service associated with a particular
851 // flight stream. This allows a client of a flight service to upload a stream
852 // of data. Depending on the particular flight service, a client consumer
853 // could be allowed to upload a single stream per descriptor or an unlimited
854 // number. In the latter, the service might implement a 'seal' action that
855 // can be applied to a descriptor once all streams are uploaded.
856 DoPut(FlightService_DoPutServer) error
858 // Open a bidirectional data channel for a given descriptor. This
859 // allows clients to send and receive arbitrary Arrow data and
860 // application-specific metadata in a single logical stream. In
861 // contrast to DoGet/DoPut, this is more suited for clients
862 // offloading computation (rather than storage) to a Flight service.
863 DoExchange(FlightService_DoExchangeServer) error
865 // Flight services can support an arbitrary number of simple actions in
866 // addition to the possible ListFlights, GetFlightInfo, DoGet, DoPut
867 // operations that are potentially available. DoAction allows a flight client
868 // to do a specific action against a flight service. An action includes
869 // opaque request and response objects that are specific to the type action
871 DoAction(*Action, FlightService_DoActionServer) error
873 // A flight service exposes all of the available action types that it has
874 // along with descriptions. This allows different flight consumers to
875 // understand the capabilities of the flight service.
876 ListActions(*Empty, FlightService_ListActionsServer) error