pacemaker  2.1.7-0f7f88312f
Scalable High-Availability cluster resource manager
Functions
services_internal.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

svc_action_tservices__create_resource_action (const char *name, const char *standard, const char *provider, const char *agent, const char *action, guint interval_ms, int timeout, GHashTable *params, enum svc_action_flags flags)
 Create a new resource action. More...
 
const char * services__exit_reason (const svc_action_t *action)
 
char * services__grab_stdout (svc_action_t *action)
 
char * services__grab_stderr (svc_action_t *action)
 
void services__set_result (svc_action_t *action, int agent_status, enum pcmk_exec_status exec_status, const char *exit_reason)
 
void services__format_result (svc_action_t *action, int agent_status, enum pcmk_exec_status exec_status, const char *format,...) G_GNUC_PRINTF(4
 

Function Documentation

◆ services__create_resource_action()

svc_action_t* services__create_resource_action ( const char *  name,
const char *  standard,
const char *  provider,
const char *  agent,
const char *  action,
guint  interval_ms,
int  timeout,
GHashTable *  params,
enum svc_action_flags  flags 
)

Create a new resource action.

Parameters
[in]nameName of resource
[in]standardResource agent standard
[in]providerResource agent provider
[in]agentResource agent name
[in]actionName of action
[in]interval_msHow often to repeat action (if 0, execute once)
[in]timeoutError if not complete within this time (ms)
[in,out]paramsAction parameters
[in]flagsGroup of enum svc_action_flags
Returns
NULL if not enough memory, otherwise newly allocated action instance (if its rc member is not PCMK_OCF_UNKNOWN, the action is invalid)
Note
This function assumes ownership of (and may free) params.
The caller is responsible for freeing the return value using services_action_free().

Definition at line 254 of file services.c.

◆ services__exit_reason()

const char* services__exit_reason ( const svc_action_t action)

Definition at line 1376 of file services.c.

◆ services__format_result()

void services__format_result ( svc_action_t action,
int  agent_status,
enum pcmk_exec_status  exec_status,
const char *  format,
  ... 
)

◆ services__grab_stderr()

char* services__grab_stderr ( svc_action_t action)

Definition at line 1411 of file services.c.

◆ services__grab_stdout()

char* services__grab_stdout ( svc_action_t action)

Definition at line 1392 of file services.c.

◆ services__set_result()

void services__set_result ( svc_action_t action,
int  agent_status,
enum pcmk_exec_status  exec_status,
const char *  exit_reason 
)

Definition at line 1271 of file services.c.