Client related classes

Client related classes

Functions

Properties

gpointer client Write / Construct Only
char * certificate-chain Read / Write
gboolean disable-server-verification Read / Write
char * override-host-name Read / Write
char * private-key Read / Write
char * tls-root-certificates Read / Write
gint64 write-size-limit-bytes Read / Write

Types and Values

Object Hierarchy

    GObject
    ├── GAFlightRecordBatchReader
       ╰── GAFlightStreamReader
    ├── GAFlightCallOptions
    ├── GAFlightClient
    ╰── GAFlightClientOptions

Includes

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

Description

GAFlightStreamReader is a class for reading record batches from a server.

GAFlightCallOptions is a class for options of each call.

GAFlightClientOptions is a class for options of each client.

GAFlightClient is a class for Apache Arrow Flight client.

Functions

gaflight_call_options_new ()

GAFlightCallOptions *
gaflight_call_options_new (void);

Returns

The newly created options for a call.

Since: 5.0.0

gaflight_call_options_add_header ()

void
gaflight_call_options_add_header (GAFlightCallOptions *options,
                                  const gchar *name,
                                  const gchar *value);

Add a header.

Parameters

options

A GAFlightCallOptions.

 

name

A header name.

 

value

A header value.

 

Since: 9.0.0

gaflight_call_options_clear_headers ()

void
gaflight_call_options_clear_headers (GAFlightCallOptions *options);

Clear all headers.

Parameters

options

A GAFlightCallOptions.

 

Since: 9.0.0

gaflight_call_options_foreach_header ()

void
gaflight_call_options_foreach_header (GAFlightCallOptions *options,
                                      GAFlightHeaderFunc func,
                                      gpointer user_data);

Iterates over all headers in the options.

Parameters

options

A GAFlightCallOptions.

 

func

The user's callback function.

[scope call]

user_data

Data for func .

[closure]

Since: 9.0.0

gaflight_client_options_new ()

GAFlightClientOptions *
gaflight_client_options_new (void);

Returns

The newly created options for a client.

Since: 5.0.0

gaflight_client_new ()

GAFlightClient *
gaflight_client_new (GAFlightLocation *location,
                     GAFlightClientOptions *options,
                     GError **error);

Parameters

location

A GAFlightLocation to be connected.

 

options

A GAFlightClientOptions.

[nullable]

error

Return location for a GError or NULL.

[nullable]

Returns

The newly created client, NULL on error.

[nullable]

Since: 5.0.0

gaflight_client_close ()

gboolean
gaflight_client_close (GAFlightClient *client,
                       GError **error);

Parameters

client

A GAFlightClient.

 

error

Return location for a GError or NULL.

[nullable]

Returns

TRUE on success, FALSE if there was an error.

Since: 8.0.0

gaflight_client_authenticate_basic_token ()

gboolean
gaflight_client_authenticate_basic_token
                               (GAFlightClient *client,
                                const gchar *user,
                                const gchar *password,
                                GAFlightCallOptions *options,
                                gchar **bearer_name,
                                gchar **bearer_value,
                                GError **error);

Authenticates to the server using basic HTTP style authentication.

Parameters

client

A GAFlightClient.

 

user

User name to be used.

 

password

Password to be used.

 

options

A GAFlightCallOptions.

[nullable]

bearer_name

Bearer token name on success.

[out][transfer full]

bearer_value

Bearer token value on success.

[out][transfer full]

error

Return location for a GError or NULL.

[nullable]

Returns

TRUE on success, FALSE if there was an error.

Since: 12.0.0

gaflight_client_list_flights ()

GList *
gaflight_client_list_flights (GAFlightClient *client,
                              GAFlightCriteria *criteria,
                              GAFlightCallOptions *options,
                              GError **error);

Parameters

client

A GAFlightClient.

 

criteria

A GAFlightCriteria.

[nullable]

options

A GAFlightCallOptions.

[nullable]

error

Return location for a GError or NULL.

[nullable]

Returns

The returned list of GAFlightInfo on success, NULL on error.

[nullable][element-type GAFlightInfo][transfer full]

Since: 5.0.0

gaflight_client_get_flight_info ()

GAFlightInfo *
gaflight_client_get_flight_info (GAFlightClient *client,
                                 GAFlightDescriptor *descriptor,
                                 GAFlightCallOptions *options,
                                 GError **error);

Parameters

client

A GAFlightClient.

 

descriptor

A GAFlightDescriptor to be processed.

 

options

A GAFlightCallOptions.

[nullable]

error

Return location for a GError or NULL.

[nullable]

Returns

The returned GAFlightInfo on success, NULL on error.

[nullable][transfer full]

Since: 9.0.0

gaflight_client_do_get ()

GAFlightStreamReader *
gaflight_client_do_get (GAFlightClient *client,
                        GAFlightTicket *ticket,
                        GAFlightCallOptions *options,
                        GError **error);

Parameters

client

A GAFlightClient.

 

ticket

A GAFlightTicket.

 

options

A GAFlightCallOptions.

[nullable]

error

Return location for a GError or NULL.

[nullable]

Returns

The GAFlightStreamReader to read record batched from the server on success, NULL on error.

[nullable][transfer full]

Since: 6.0.0

Types and Values

GAFLIGHT_TYPE_STREAM_READER

#define             GAFLIGHT_TYPE_STREAM_READER

struct GAFlightStreamReaderClass

struct GAFlightStreamReaderClass {
  GAFlightRecordBatchReaderClass parent_class;
};

GAFLIGHT_TYPE_CALL_OPTIONS

#define GAFLIGHT_TYPE_CALL_OPTIONS (gaflight_call_options_get_type())

struct GAFlightCallOptionsClass

struct GAFlightCallOptionsClass {
  GObjectClass parent_class;
};

GAFLIGHT_TYPE_CLIENT_OPTIONS

#define GAFLIGHT_TYPE_CLIENT_OPTIONS (gaflight_client_options_get_type())

struct GAFlightClientOptionsClass

struct GAFlightClientOptionsClass {
  GObjectClass parent_class;
};

GAFLIGHT_TYPE_CLIENT

#define GAFLIGHT_TYPE_CLIENT (gaflight_client_get_type())

struct GAFlightClientClass

struct GAFlightClientClass {
  GObjectClass parent_class;
};

GAFlightCallOptions

typedef struct _GAFlightCallOptions GAFlightCallOptions;

GAFlightClient

typedef struct _GAFlightClient GAFlightClient;

GAFlightClientOptions

typedef struct _GAFlightClientOptions GAFlightClientOptions;

GAFlightStreamReader

typedef struct _GAFlightStreamReader GAFlightStreamReader;

Property Details

The “client” property

  “client”                   gpointer

The raw std::shared_ptr<arrow::flight::FlightClient>.

Owner: GAFlightClient

Flags: Write / Construct Only

The “certificate-chain” property

  “certificate-chain”        char *

The client certificate to use if using Mutual TLS.

Owner: GAFlightClientOptions

Flags: Read / Write

Default value: ""

Since: 14.0.0

The “disable-server-verification” property

  “disable-server-verification” gboolean

Whether use TLS without validating the server certificate. Use with caution.

Owner: GAFlightClientOptions

Flags: Read / Write

Default value: FALSE

Since: 9.0.0

The “override-host-name” property

  “override-host-name”       char *

Override the host name checked by TLS. Use with caution.

Owner: GAFlightClientOptions

Flags: Read / Write

Default value: ""

Since: 14.0.0

The “private-key” property

  “private-key”              char *

The private key associated with the client certificate for Mutual TLS.

Owner: GAFlightClientOptions

Flags: Read / Write

Default value: ""

Since: 14.0.0

The “tls-root-certificates” property

  “tls-root-certificates”    char *

Root certificates to use for validating server certificates.

Owner: GAFlightClientOptions

Flags: Read / Write

Default value: ""

Since: 14.0.0

The “write-size-limit-bytes” property

  “write-size-limit-bytes”   gint64

A soft limit on the number of bytes to write in a single batch when sending Arrow data to a server.

Used to help limit server memory consumption. Only enabled if positive. When enabled, GARROW_ERROR_IO may be yielded.

Owner: GAFlightClientOptions

Flags: Read / Write

Default value: 0

Since: 14.0.0