mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-25 16:16:29 +00:00
repmgr node status: collate output into list
To make output in different formats (e.g. CSV) easier.
This commit is contained in:
24
strutil.h
24
strutil.h
@@ -31,6 +31,19 @@ typedef struct ItemList
|
||||
ItemListCell *tail;
|
||||
} ItemList;
|
||||
|
||||
typedef struct KeyValueListCell
|
||||
{
|
||||
struct KeyValueListCell *next;
|
||||
char *key;
|
||||
char *value;
|
||||
} KeyValueListCell;
|
||||
|
||||
typedef struct KeyValueList
|
||||
{
|
||||
KeyValueListCell *head;
|
||||
KeyValueListCell *tail;
|
||||
} KeyValueList;
|
||||
|
||||
|
||||
extern int
|
||||
maxlen_snprintf(char *str, const char *format,...)
|
||||
@@ -47,6 +60,17 @@ extern void
|
||||
item_list_append_format(ItemList *item_list, const char *format, ...)
|
||||
__attribute__((format(PG_PRINTF_ATTRIBUTE, 2, 3)));
|
||||
|
||||
extern void
|
||||
key_value_list_set(KeyValueList *item_list, const char *key, const char *value);
|
||||
|
||||
extern void
|
||||
key_value_list_set_format(KeyValueList *item_list, const char *key, const char *value, ...)
|
||||
__attribute__((format(PG_PRINTF_ATTRIBUTE, 3, 4)));
|
||||
|
||||
extern const char *
|
||||
key_value_list_get(KeyValueList *item_list, const char *key);
|
||||
|
||||
|
||||
extern char *
|
||||
escape_recovery_conf_value(const char *src);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user