pacemaker 3.0.1-16e74fc4da
Scalable High-Availability cluster resource manager
Loading...
Searching...
No Matches
scores.h
Go to the documentation of this file.
1/*
2 * Copyright 2004-2024 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__CRM_COMMON_SCORES__H
11#define PCMK__CRM_COMMON_SCORES__H
12
13#include <stdbool.h> // bool
14
15#ifdef __cplusplus
16extern "C" {
17#endif
18
26#define PCMK_SCORE_INFINITY 1000000
27
28int pcmk_parse_score(const char *score_s, int *score, int default_score);
29const char *pcmk_readable_score(int score);
30bool pcmk_str_is_infinity(const char *s);
31bool pcmk_str_is_minus_infinity(const char *s);
32
33#ifdef __cplusplus
34}
35#endif
36
37#if !defined(PCMK_ALLOW_DEPRECATED) || (PCMK_ALLOW_DEPRECATED == 1)
39#endif
40
41#endif // PCMK__CRM_COMMON_SCORES__H
bool pcmk_str_is_infinity(const char *s)
Definition scores.c:130
int pcmk_parse_score(const char *score_s, int *score, int default_score)
Parse an integer score from a string.
Definition scores.c:34
const char * pcmk_readable_score(int score)
Return a displayable static string for a score value.
Definition scores.c:102
bool pcmk_str_is_minus_infinity(const char *s)
Definition scores.c:144