HAProxy tool TAPI

Overview

TAPI to manage HAProxy tool. More…

// typedefs

typedef struct tapi_haproxy_opt tapi_haproxy_opt;
typedef struct tapi_haproxy_app tapi_haproxy_app;

// structs

struct tapi_haproxy_app;
struct tapi_haproxy_opt;

// global variables

const tapi_haproxy_opt tapi_haproxy_default_opt;

// global functions

te_errno tapi_haproxy_create(tapi_job_factory_t* factory, const tapi_haproxy_opt* opt, tapi_haproxy_app** app);
te_errno tapi_haproxy_start(tapi_haproxy_app* app);
te_errno tapi_haproxy_wait(tapi_haproxy_app* app, int timeout_ms);
te_errno tapi_haproxy_kill(tapi_haproxy_app* app, int signo);
te_errno tapi_haproxy_destroy(tapi_haproxy_app* app);

// macros

#define TAPI_HAPROXY_CONF_FILENAME_SUFFIX
#define TAPI_HAPROXY_PATH
#define TAPI_HAPROXY_TERM_TIMEOUT_MS

Detailed Documentation

TAPI to manage HAProxy tool.

Typedefs

typedef struct tapi_haproxy_opt tapi_haproxy_opt

HAProxy specific command line options.

typedef struct tapi_haproxy_app tapi_haproxy_app

HAProxy tool information.

Global Variables

const tapi_haproxy_opt tapi_haproxy_default_opt

Default options initializer.

Global Functions

te_errno tapi_haproxy_create(tapi_job_factory_t* factory, const tapi_haproxy_opt* opt, tapi_haproxy_app** app)

Create HAProxy app.

Parameters:

factory

Job factory.

opt

HAProxy tool options.

app

HAProxy app handle.

Returns:

Status code.

te_errno tapi_haproxy_start(tapi_haproxy_app* app)

Start HAProxy tool.

Parameters:

app

HAProxy app handle.

Returns:

Status code.

te_errno tapi_haproxy_wait(tapi_haproxy_app* app, int timeout_ms)

Wait for HAProxy tool completion.

Parameters:

app

HAProxy app handle.

timeout_ms

Wait timeout in milliseconds.

TE_EINPROGRESS

HAProxy is still running.

Returns:

Status code.

te_errno tapi_haproxy_kill(tapi_haproxy_app* app, int signo)

Send a signal to HAProxy tool.

Parameters:

app

HAProxy app handle.

signum

Signal to send.

Returns:

Status code.

te_errno tapi_haproxy_destroy(tapi_haproxy_app* app)

Destroy HAProxy app. The app cannot be used after calling this function.

Parameters:

app

HAProxy app handle.

Returns:

Status code.