MINOR: checks/vars: Add a check scope for variables
Add a dedicated vars scope for checks. This scope is considered as part of the
session scope for accounting purposes.
The scope can be addressed by a valid session, even embryonic. The stream is not
necessary.
The scope is initialized after the check session is created. All variables are
then pruned before the session is destroyed.
diff --git a/include/proto/checks.h b/include/proto/checks.h
index 37681f1..d949175 100644
--- a/include/proto/checks.h
+++ b/include/proto/checks.h
@@ -26,6 +26,8 @@
#include <common/config.h>
#include <types/mailers.h>
+#include <types/action.h>
+
const char *get_check_status_description(short check_status);
const char *get_check_status_info(short check_status);
void __health_adjust(struct server *s, short status);
diff --git a/include/types/checks.h b/include/types/checks.h
index f92f0da..b980faa 100644
--- a/include/types/checks.h
+++ b/include/types/checks.h
@@ -159,6 +159,7 @@
struct check {
struct session *sess; /* Health check session. */
+ struct vars vars; /* Health check dynamic variables. */
struct xprt_ops *xprt; /* transport layer operations for health checks */
struct conn_stream *cs; /* conn_stream state for health checks */
struct buffer bi, bo; /* input and output buffers to send/recv check */
diff --git a/include/types/vars.h b/include/types/vars.h
index 9b166e9..a72469f 100644
--- a/include/types/vars.h
+++ b/include/types/vars.h
@@ -12,6 +12,7 @@
SCOPE_REQ,
SCOPE_RES,
SCOPE_PROC,
+ SCOPE_CHECK,
};
struct vars {