mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-22 22:56:29 +00:00
Additional "node status" output
This commit is contained in:
12
strutil.h
12
strutil.h
@@ -19,6 +19,14 @@
|
||||
|
||||
#define MAXLEN_STR STR(MAXLEN)
|
||||
|
||||
typedef enum {
|
||||
OM_NOT_SET = -1,
|
||||
OM_TEXT,
|
||||
OM_CSV,
|
||||
OM_NAGIOS,
|
||||
OM_OPTFORMAT
|
||||
} OutputMode;
|
||||
|
||||
typedef struct ItemListCell
|
||||
{
|
||||
struct ItemListCell *next;
|
||||
@@ -36,6 +44,7 @@ typedef struct KeyValueListCell
|
||||
struct KeyValueListCell *next;
|
||||
char *key;
|
||||
char *value;
|
||||
OutputMode output_mode;
|
||||
} KeyValueListCell;
|
||||
|
||||
typedef struct KeyValueList
|
||||
@@ -67,6 +76,9 @@ extern void
|
||||
key_value_list_set_format(KeyValueList *item_list, const char *key, const char *value, ...)
|
||||
__attribute__((format(PG_PRINTF_ATTRIBUTE, 3, 4)));
|
||||
|
||||
extern void
|
||||
key_value_list_set_output_mode(KeyValueList *item_list, const char *key, OutputMode mode);
|
||||
|
||||
extern const char *
|
||||
key_value_list_get(KeyValueList *item_list, const char *key);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user