pacemaker
2.0.5-ba59be712
Scalable High-Availability cluster resource manager
include
crm
common
ipc_pacemakerd.h
Go to the documentation of this file.
1
/*
2
* Copyright 2020 the Pacemaker project contributors
3
*
4
* The version control history for this file may have further details.
5
*
6
* This source code is licensed under the GNU Lesser General Public License
7
* version 2.1 or later (LGPLv2.1+) WITHOUT ANY WARRANTY.
8
*/
9
10
#ifndef PCMK__IPC_PACEMAKERD__H
11
# define PCMK__IPC_PACEMAKERD__H
12
13
#ifdef __cplusplus
14
extern
"C"
{
15
#endif
16
24
#include <sys/types.h>
// time_t
25
#include <
crm/common/ipc.h
>
// pcmk_ipc_api_t
26
27
enum
pcmk_pacemakerd_state
{
28
pcmk_pacemakerd_state_invalid
= -1,
29
pcmk_pacemakerd_state_init
= 0,
30
pcmk_pacemakerd_state_starting_daemons
,
31
pcmk_pacemakerd_state_wait_for_ping
,
32
pcmk_pacemakerd_state_running
,
33
pcmk_pacemakerd_state_shutting_down
,
34
pcmk_pacemakerd_state_shutdown_complete
,
35
pcmk_pacemakerd_state_max
=
pcmk_pacemakerd_state_shutdown_complete
,
36
};
37
39
enum
pcmk_pacemakerd_api_reply
{
40
pcmk_pacemakerd_reply_unknown
,
41
pcmk_pacemakerd_reply_ping
,
42
};
43
47
typedef
struct
{
48
enum
pcmk_pacemakerd_api_reply
reply_type;
49
50
union
{
51
// pcmk_pacemakerd_reply_ping
52
struct
{
53
const
char
*
sys_from
;
54
enum
pcmk_pacemakerd_state
state;
55
time_t
last_good
;
56
int
status
;
57
} ping;
58
}
data
;
59
}
pcmk_pacemakerd_api_reply_t
;
60
61
int
pcmk_pacemakerd_api_ping
(
pcmk_ipc_api_t
*api,
const
char
*ipc_name);
62
enum
pcmk_pacemakerd_state
63
pcmk_pacemakerd_api_daemon_state_text2enum
(
const
char
*state);
64
const
char
65
*
pcmk_pacemakerd_api_daemon_state_enum2text
(
enum
pcmk_pacemakerd_state
state);
66
67
#ifdef __cplusplus
68
}
69
#endif
70
71
#endif // PCMK__IPC_PACEMAKERD__H
pcmk_pacemakerd_state_shutting_down
Definition:
ipc_pacemakerd.h:33
pcmk_pacemakerd_state_max
Definition:
ipc_pacemakerd.h:35
pcmk_pacemakerd_state_starting_daemons
Definition:
ipc_pacemakerd.h:30
pcmk_pacemakerd_state_running
Definition:
ipc_pacemakerd.h:32
pcmk_pacemakerd_state_invalid
Definition:
ipc_pacemakerd.h:28
pcmk_pacemakerd_api_reply
pcmk_pacemakerd_api_reply
Possible types of pacemakerd replies.
Definition:
ipc_pacemakerd.h:39
pcmk_pacemakerd_api_reply_t::status
int status
Definition:
ipc_pacemakerd.h:56
pcmk_pacemakerd_state_shutdown_complete
Definition:
ipc_pacemakerd.h:34
pcmk_pacemakerd_api_daemon_state_text2enum
enum pcmk_pacemakerd_state pcmk_pacemakerd_api_daemon_state_text2enum(const char *state)
Definition:
ipc_pacemakerd.c:38
pcmk_pacemakerd_api_reply_t::last_good
time_t last_good
Definition:
ipc_pacemakerd.h:55
pcmk_pacemakerd_api_reply_t::sys_from
const char * sys_from
Definition:
ipc_pacemakerd.h:53
pcmk_pacemakerd_api_reply_t
Definition:
ipc_pacemakerd.h:47
pcmk_pacemakerd_state_wait_for_ping
Definition:
ipc_pacemakerd.h:31
pcmk_pacemakerd_api_ping
int pcmk_pacemakerd_api_ping(pcmk_ipc_api_t *api, const char *ipc_name)
Definition:
ipc_pacemakerd.c:205
pcmk_ipc_api_s
Definition:
crmcommon_private.h:232
pcmk_pacemakerd_state_init
Definition:
ipc_pacemakerd.h:29
pcmk_pacemakerd_reply_unknown
Definition:
ipc_pacemakerd.h:40
pcmk_pacemakerd_state
pcmk_pacemakerd_state
Definition:
ipc_pacemakerd.h:27
pcmk_pacemakerd_api_daemon_state_enum2text
const char * pcmk_pacemakerd_api_daemon_state_enum2text(enum pcmk_pacemakerd_state state)
Definition:
ipc_pacemakerd.c:55
data
char data[0]
Definition:
internal.h:90
ipc.h
IPC interface to Pacemaker daemons.
pcmk_pacemakerd_reply_ping
Definition:
ipc_pacemakerd.h:41
Generated on Wed Dec 2 2020 15:53:06 for pacemaker by
1.8.15