redis-server tool TAPI (tapi_redis_srv)

Overview

TAPI to handle redis-server tool. More…

// typedefs

typedef struct tapi_redis_srv_app tapi_redis_srv_app;
typedef enum tapi_redis_srv_loglevel tapi_redis_srv_loglevel;
typedef enum tapi_redis_srv_rdl tapi_redis_srv_rdl;
typedef struct tapi_redis_srv_opt tapi_redis_srv_opt;

// enums

enum tapi_redis_srv_loglevel;
enum tapi_redis_srv_rdl;

// structs

struct tapi_redis_srv_app;
struct tapi_redis_srv_opt;

// global variables

const tapi_redis_srv_opt tapi_redis_srv_default_opt;

// global functions

te_errno tapi_redis_srv_create(tapi_job_factory_t* factory, tapi_redis_srv_opt* opt, tapi_redis_srv_app** app);
te_errno tapi_redis_srv_start(const tapi_redis_srv_app* app);
te_errno tapi_redis_srv_wait(const tapi_redis_srv_app* app, int timeout_ms);
te_errno tapi_redis_srv_stop(const tapi_redis_srv_app* app);
te_errno tapi_redis_srv_kill(const tapi_redis_srv_app* app, int signum);
te_errno tapi_redis_srv_destroy(tapi_redis_srv_app* app);

// macros

#define TAPI_REDIS_SRV_TIMEOUT_MS

Detailed Documentation

TAPI to handle redis-server tool.

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

Typedefs

typedef struct tapi_redis_srv_app tapi_redis_srv_app

Redis-server tool information.

typedef enum tapi_redis_srv_loglevel tapi_redis_srv_loglevel

Representation of possible values for loglevel option.

typedef enum tapi_redis_srv_rdl tapi_redis_srv_rdl

Representation of possible values for repl_diskless_load option.

typedef struct tapi_redis_srv_opt tapi_redis_srv_opt

Redis-server configuration options.

Global Variables

const tapi_redis_srv_opt tapi_redis_srv_default_opt

Redis-server configuration file default options.

Global Functions

te_errno tapi_redis_srv_create(tapi_job_factory_t* factory, tapi_redis_srv_opt* opt, tapi_redis_srv_app** app)

Create redis-server configuration file on TA. Create redis-server app.

Parameters:

factory

job factory

opt

redis-server options

app

redis-server app handle

Returns:

Status code.

te_errno tapi_redis_srv_start(const tapi_redis_srv_app* app)

Start redis-server.

Parameters:

app

redis-server app handle

Returns:

Status code.

te_errno tapi_redis_srv_wait(const tapi_redis_srv_app* app, int timeout_ms)

Wait for redis-server completion.

Parameters:

app

redis-server app handle

timeout_ms

wait timeout in milliseconds

Returns:

Status code.

te_errno tapi_redis_srv_stop(const tapi_redis_srv_app* app)

Stop redis-server. It can be started over with tapi_redis_srv_start.

Parameters:

app

redis-server app handle

Returns:

Status code.

te_errno tapi_redis_srv_kill(const tapi_redis_srv_app* app, int signum)

Send a signal to redis-server.

Parameters:

app

redis-server app handle

signum

signal to send

Returns:

Status code.

te_errno tapi_redis_srv_destroy(tapi_redis_srv_app* app)

Destroy redis-server.

Parameters:

app

redis app handle

Returns:

Status code.