2 CTDB event daemon protocol
5 Copyright (C) Amitay Isaacs 2018
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 3 of the License, or
10 (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, see <http://www.gnu.org/licenses/>.
21 #ifndef __CTDB_EVENT_PROTOCOL_H__
22 #define __CTDB_EVENT_PROTOCOL_H__
24 #define CTDB_EVENT_PROTOCOL_VERSION 1
26 enum ctdb_event_script_action
{
27 CTDB_EVENT_SCRIPT_DISABLE
= 0,
28 CTDB_EVENT_SCRIPT_ENABLE
= 1,
31 enum ctdb_event_command
{
32 CTDB_EVENT_CMD_RUN
= 1,
33 CTDB_EVENT_CMD_STATUS
= 2,
34 CTDB_EVENT_CMD_SCRIPT
= 3,
35 CTDB_EVENT_CMD_MAX
= 4,
38 struct ctdb_event_script
{
46 struct ctdb_event_script_list
{
48 struct ctdb_event_script
*script
;
51 #define CTDB_EVENT_RUN_ALL 1
53 struct ctdb_event_request_run
{
54 const char *component
;
61 struct ctdb_event_request_status
{
62 const char *component
;
66 struct ctdb_event_request_script
{
67 const char *component
;
69 enum ctdb_event_script_action action
;
72 struct ctdb_event_reply_status
{
74 struct ctdb_event_script_list
*script_list
;
77 struct ctdb_event_header
{
83 struct ctdb_event_request
{
84 enum ctdb_event_command cmd
;
86 struct ctdb_event_request_run
*run
;
87 struct ctdb_event_request_status
*status
;
88 struct ctdb_event_request_script
*script
;
92 struct ctdb_event_reply
{
93 enum ctdb_event_command cmd
;
96 struct ctdb_event_reply_status
*status
;
100 #endif /* __CTDB_EVENT_PROTOCOL_H__ */