TAPI to manage memcached

Overview

TAPI to manage memcached. More…

// typedefs

typedef struct tapi_memcached_app tapi_memcached_app;
typedef enum tapi_mamcached_proto tapi_mamcached_proto_t;
typedef enum tapi_mamcached_verbose tapi_mamcached_verbose_t;
typedef struct tapi_memcached_opt tapi_memcached_opt;

// enums

enum tapi_mamcached_proto;
enum tapi_mamcached_verbose;

// structs

struct tapi_memcached_app;
struct tapi_memcached_opt;

// global variables

const struct sockaddr_in zero_sockaddr;
const tapi_memcached_opt tapi_memcached_default_opt;

// global functions

te_errno tapi_memcached_create(tapi_job_factory_t* factory, const tapi_memcached_opt* opt, tapi_memcached_app** app);
te_errno tapi_memcached_start(const tapi_memcached_app* app);
te_errno tapi_memcached_wait(const tapi_memcached_app* app, int timeout_ms);
te_errno tapi_memcached_stop(const tapi_memcached_app* app);
te_errno tapi_memcached_kill(const tapi_memcached_app* app, int signum);
te_errno tapi_memcached_destroy(tapi_memcached_app* app);

Detailed Documentation

TAPI to manage memcached.

Copyright (C) 2022-2022 OKTET Labs Ltd. All rights reserved.

Typedefs

typedef struct tapi_memcached_app tapi_memcached_app

memcached tool information.

typedef enum tapi_mamcached_proto tapi_mamcached_proto_t

Representation of possible values for memcached::protocol option.

typedef enum tapi_mamcached_verbose tapi_mamcached_verbose_t

Representation of possible values for memcached::verbose option.

typedef struct tapi_memcached_opt tapi_memcached_opt

Specific memcached options.

Global Variables

const struct sockaddr_in zero_sockaddr

Constant for sockaddr “0.0.0.0:0” initialization.

Can be used when there is a need to use localhost or zero port.

const tapi_memcached_opt tapi_memcached_default_opt

Default memcached options initializer.

Global Functions

te_errno tapi_memcached_create(tapi_job_factory_t* factory, const tapi_memcached_opt* opt, tapi_memcached_app** app)

Create memcached app.

Parameters:

factory

Job factory.

opt

memcached options.

app

memcached app handle.

Returns:

Status code.

te_errno tapi_memcached_start(const tapi_memcached_app* app)

Start memcached.

Parameters:

app

memcached app handle.

Returns:

Status code.

te_errno tapi_memcached_wait(const tapi_memcached_app* app, int timeout_ms)

Wait for memcached completion.

Parameters:

app

memcached app handle.

timeout_ms

Wait timeout in milliseconds.

Returns:

Status code.

te_errno tapi_memcached_stop(const tapi_memcached_app* app)

Stop memcached. It can be started over with tapi_memcached_start().

Parameters:

app

memcached app handle.

Returns:

Status code.

te_errno tapi_memcached_kill(const tapi_memcached_app* app, int signum)

Send a signal to memcached.

Parameters:

app

memcached app handle.

signum

Signal to send.

Returns:

Status code.

te_errno tapi_memcached_destroy(tapi_memcached_app* app)

Destroy memcached.

Parameters:

app

memcached app handle.

Returns:

Status code.