MEDIUM: checks: Use a shared ruleset to store tcp-check rules
All tcp-check rules are now stored in the globla shared list. The ones created
to parse a specific protocol, for instance redis, are already stored in this
list. Now pure tcp-check rules are also stored in it. The ruleset name is
created using the proxy name and its config file and line. tcp-check rules
declared in a defaults section are also stored this way using "defaults" as
proxy name.
For now, all tcp-check ruleset are stored in a list. But it could be a bit slow
to looks for a specific ruleset with a huge number of backends. So, it could be
a good idea to use a tree instead.
diff --git a/include/types/checks.h b/include/types/checks.h
index 941fd2e..fcf30d3 100644
--- a/include/types/checks.h
+++ b/include/types/checks.h
@@ -307,9 +307,8 @@
};
};
-#define TCPCHK_RULES_NONE 0x00000000
-#define TCPCHK_RULES_SHARED 0x00000001 /* Set for shared list of tcp-check rules */
-#define TCPCHK_RULES_DEF 0x00000002 /* Ruleset inherited from the default section */
+#define TCPCHK_RULES_NONE 0x00000000
+#define TCPCHK_RULES_UNUSED_TCP_RS 0x00000001 /* An unused tcp-check ruleset exists */
#define TCPCHK_RULES_PGSQL_CHK 0x00000010
#define TCPCHK_RULES_REDIS_CHK 0x00000020