1 /*
2 * Copyright 2010-2021 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__SERVICES_INTERNAL__H
11 # define PCMK__SERVICES_INTERNAL__H
12
13 #ifdef __cplusplus
14 extern "C" {
15 #endif
16
17 /**
18 * \brief Create a new resource action
19 *
20 * \param[in] name Name of resource
21 * \param[in] standard Resource agent standard (ocf, lsb, etc.)
22 * \param[in] provider Resource agent provider
23 * \param[in] agent Resource agent name
24 * \param[in] action action (start, stop, monitor, etc.)
25 * \param[in] interval_ms How often to repeat this action (if 0, execute once)
26 * \param[in] timeout Consider action failed if it does not complete in this many milliseconds
27 * \param[in] params Action parameters
28 *
29 * \return newly allocated action instance
30 *
31 * \post After the call, 'params' is owned, and later free'd by the svc_action_t result
32 * \note The caller is responsible for freeing the return value using
33 * services_action_free().
34 */
35 svc_action_t *services__create_resource_action(const char *name, const char *standard,
36 const char *provider, const char *agent,
37 const char *action, guint interval_ms,
38 int timeout /* ms */, GHashTable *params,
39 enum svc_action_flags flags);
40
41 # ifdef __cplusplus
42 }
43 # endif
44
45 #endif /* PCMK__SERVICES_INTERNAL__H */