pacemaker  2.1.4-dc6eb4362
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 (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 (ocf, lsb, etc.)
[in]providerResource agent provider
[in]agentResource agent name
[in]actionaction (start, stop, monitor, etc.)
[in]interval_msHow often to repeat this action (if 0, execute once)
[in]timeoutConsider action failed if it does not complete in this many milliseconds
[in]paramsAction parameters
Returns
NULL if not enough memory, otherwise newly allocated action instance (if its rc member is not PCMK_OCF_UNKNOWN, the action is invalid)
Postcondition
After the call, 'params' is owned, and later free'd by the svc_action_t result
Note
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 ( 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.