Extract "state-watching" etcd client into a separate file

This commit is contained in:
Vitaliy Filippov
2020-05-22 12:38:40 +03:00
parent 6202260018
commit f6a01a4819
10 changed files with 566 additions and 480 deletions
+33
View File
@@ -0,0 +1,33 @@
#include "pg_states.h"
const int pg_state_bit_count = 13;
const int pg_state_bits[13] = {
PG_STARTING,
PG_PEERING,
PG_INCOMPLETE,
PG_ACTIVE,
PG_STOPPING,
PG_OFFLINE,
PG_DEGRADED,
PG_HAS_INCOMPLETE,
PG_HAS_DEGRADED,
PG_HAS_MISPLACED,
PG_HAS_UNCLEAN,
PG_LEFT_ON_DEAD,
};
const char *pg_state_names[13] = {
"starting",
"peering",
"incomplete",
"active",
"stopping",
"offline",
"degraded",
"has_incomplete",
"has_degraded",
"has_misplaced",
"has_unclean",
"left_on_dead",
};