Server related classes

Server related classes

Functions

Properties

gpointer stream Write / Construct Only
GArrowRecordBatchReader * reader Read / Write / Construct Only
gpointer call-context Write / Construct Only
GAFlightLocation * location Read / Write / Construct Only

Types and Values

Object Hierarchy

    GInterface
    ╰── GAFlightServable
    GObject
    ├── GAFlightDataStream
       ╰── GAFlightRecordBatchStream
    ├── GAFlightServer
    ├── GAFlightServerCallContext
    ╰── GAFlightServerOptions

Prerequisites

GAFlightServable requires GObject.

Implemented Interfaces

GAFlightServer implements GAFlightServable.

Known Implementations

GAFlightServable is implemented by GAFlightServer.

Includes

#include <arrow-flight-glib/arrow-flight-glib.h>

Description

GAFlightDataStream is a class for producing a sequence of IPC payloads to be sent in FlightData protobuf messages. Generally, this is not used directly. Generally, GAFlightRecordBatchStream is used instead.

GAFlightRecordBatchStream is a class for producing a sequence of IPC payloads to be sent in FlightData protobuf messages by GArrowRecordBatchReader`.

GAFlightServerOptions is a class for options of each server.

GAFlightServerCallContext is a class for context of each server call.

GAFlightServer is a class to develop an Apache Arrow Flight server.

Functions

gaflight_record_batch_stream_new ()

GAFlightRecordBatchStream *
gaflight_record_batch_stream_new (GArrowRecordBatchReader *reader,
                                  GArrowWriteOptions *options);

Parameters

reader

A GArrowRecordBatchReader to be read.

 

options

A GArrowWriteOptions for writing record batches to a client.

[nullable]

Returns

The newly created GAFlightRecordBatchStream.

Since: 6.0.0


gaflight_server_options_new ()

GAFlightServerOptions *
gaflight_server_options_new (GAFlightLocation *location);

Parameters

location

A GAFlightLocation to be listened.

 

Returns

The newly created options for a server.

Since: 5.0.0


gaflight_server_listen ()

gboolean
gaflight_server_listen (GAFlightServer *server,
                        GAFlightServerOptions *options,
                        GError **error);

Parameters

server

A GAFlightServer.

 

options

A GAFlightServerOptions.

 

error

Return location for a GError or NULL.

[nullable]

Returns

TRUE on success, FALSE on error.

Since: 5.0.0


gaflight_server_get_port ()

gint
gaflight_server_get_port (GAFlightServer *server);

gaflight_server_shutdown ()

gboolean
gaflight_server_shutdown (GAFlightServer *server,
                          GError **error);

Shuts down the serve. This function can be called from signal handler or another thread.

Parameters

server

A GAFlightServer.

 

error

Return location for a GError or NULL.

[nullable]

Returns

TRUE on success, FALSE on error.

Since: 5.0.0


gaflight_server_wait ()

gboolean
gaflight_server_wait (GAFlightServer *server,
                      GError **error);

gaflight_server_list_flights ()

GList *
gaflight_server_list_flights (GAFlightServer *server,
                              GAFlightServerCallContext *context,
                              GAFlightCriteria *criteria,
                              GError **error);

Parameters

server

A GAFlightServer.

 

context

A GAFlightServerCallContext.

 

criteria

A GAFlightCriteria.

[nullable]

error

Return location for a GError or NULL.

[nullable]

Returns

GList of GAFlightInfo on success, NULL on error.

[element-type GAFlightInfo][transfer full]

Since: 5.0.0


gaflight_server_get_flight_info ()

GAFlightInfo *
gaflight_server_get_flight_info (GAFlightServer *server,
                                 GAFlightServerCallContext *context,
                                 GAFlightDescriptor *request,
                                 GError **error);

Parameters

server

A GAFlightServer.

 

context

A GAFlightServerCallContext.

 

request

A GAFlightDescriptor.

 

error

Return location for a GError or NULL.

[nullable]

Returns

A GAFlightInfo on success, NULL on error.

[transfer full]

Since: 9.0.0


gaflight_server_do_get ()

GAFlightDataStream *
gaflight_server_do_get (GAFlightServer *server,
                        GAFlightServerCallContext *context,
                        GAFlightTicket *ticket,
                        GError **error);

Parameters

server

A GAFlightServer.

 

context

A GAFlightServerCallContext.

 

ticket

A GAFlightTicket.

 

error

Return location for a GError or NULL.

[nullable]

Returns

GAFlightDataStream on success, NULL on error.

[transfer full]

Since: 6.0.0

Types and Values

GAFLIGHT_TYPE_DATA_STREAM

#define             GAFLIGHT_TYPE_DATA_STREAM

struct GAFlightDataStreamClass

struct GAFlightDataStreamClass {
  GObjectClass parent_class;
};

GAFLIGHT_TYPE_RECORD_BATCH_STREAM

#define             GAFLIGHT_TYPE_RECORD_BATCH_STREAM

struct GAFlightRecordBatchStreamClass

struct GAFlightRecordBatchStreamClass {
  GAFlightDataStreamClass parent_class;
};

GAFLIGHT_TYPE_SERVER_OPTIONS

#define GAFLIGHT_TYPE_SERVER_OPTIONS (gaflight_server_options_get_type())

struct GAFlightServerOptionsClass

struct GAFlightServerOptionsClass {
  GObjectClass parent_class;
};

GAFLIGHT_TYPE_SERVER_CALL_CONTEXT

#define             GAFLIGHT_TYPE_SERVER_CALL_CONTEXT

struct GAFlightServerCallContextClass

struct GAFlightServerCallContextClass {
  GObjectClass parent_class;
};

GAFLIGHT_TYPE_SERVABLE

#define GAFLIGHT_TYPE_SERVABLE (gaflight_servable_get_type())

GAFLIGHT_TYPE_SERVER

#define GAFLIGHT_TYPE_SERVER (gaflight_server_get_type())

struct GAFlightServerClass

struct GAFlightServerClass {
  GObjectClass parent_class;

  GList *(*list_flights)(GAFlightServer *server,
                         GAFlightServerCallContext *context,
                         GAFlightCriteria *criteria,
                         GError **error);
  GAFlightInfo *(*get_flight_info)(GAFlightServer *server,
                                   GAFlightServerCallContext *context,
                                   GAFlightDescriptor *request,
                                   GError **error);
  GAFlightDataStream *(*do_get)(GAFlightServer *server,
                                GAFlightServerCallContext *context,
                                GAFlightTicket *ticket,
                                GError **error);
};

Members

list_flights ()

A virtual function to implement ListFlights API.

 

get_flight_info ()

   

do_get ()

A virtual function to implement DoGet API.

 

Since: 5.0.0


GAFlightDataStream

typedef struct _GAFlightDataStream GAFlightDataStream;

GAFlightRecordBatchStream

typedef struct _GAFlightRecordBatchStream GAFlightRecordBatchStream;

GAFlightServable

typedef struct _GAFlightServable GAFlightServable;

GAFlightServableInterface

typedef struct _GAFlightServableInterface GAFlightServableInterface;

GAFlightServer

typedef struct _GAFlightServer GAFlightServer;

GAFlightServerCallContext

typedef struct _GAFlightServerCallContext GAFlightServerCallContext;

GAFlightServerOptions

typedef struct _GAFlightServerOptions GAFlightServerOptions;

Property Details

The “stream” property

  “stream”                   gpointer

The raw arrow::flight::FlightDataStream *.

Owner: GAFlightDataStream

Flags: Write / Construct Only


The “reader” property

  “reader”                   GArrowRecordBatchReader *

The reader that produces record batches.

Owner: GAFlightRecordBatchStream

Flags: Read / Write / Construct Only

Since: 6.0.0


The “call-context” property

  “call-context”             gpointer

The raw arrow::flight::ServerCallContext.

Owner: GAFlightServerCallContext

Flags: Write / Construct Only


The “location” property

  “location”                 GAFlightLocation *

The location to be listened.

Owner: GAFlightServerOptions

Flags: Read / Write / Construct Only