const struct mux_proto_list *mux_proto; /* the mux to use for all outgoing connections (specified by the "proto" keyword) */
struct list check_queue; /* entry in the check queue. Not empty = in queue. */
int via_socks4; /* check the connection via socks4 proxy */
+ struct ist unique_id; /* custom unique ID, same as in struct stream */
};
#endif /* _HAPROXY_CHECKS_T_H */
#include <haproxy/proxy-t.h>
#include <haproxy/server-t.h>
#include <haproxy/trace-t.h>
+#include <haproxy/log.h>
extern struct trace_source trace_check;
int check_buf_available(void *target);
struct buffer *check_get_buf(struct check *check, struct buffer *bptr, unsigned int small_buffer);
void check_release_buf(struct check *check, struct buffer *bptr);
+
+static inline struct ist check_generate_unique_id(struct check *check, struct lf_expr *format)
+{
+ if (!isttest(check->unique_id)) {
+ generate_unique_id(&check->unique_id, check->sess, NULL, format);
+ }
+
+ return check->unique_id;
+}
+
const char *init_check(struct check *check, int type);
void free_check(struct check *check);
void check_purge(struct check *check);
check->result = CHK_RES_UNKNOWN; /* no result yet */
check->desc[0] = '\0';
check->start = now_ns;
+
+ /* Reset unique_id. */
+ pool_free(pool_head_uniqueid, istptr(check->unique_id));
+ check->unique_id = IST_NULL;
+
return;
}
ha_free(&check->tcpcheck);
}
+ pool_free(pool_head_uniqueid, istptr(check->unique_id));
+ check->unique_id = IST_NULL;
ha_free(&check->pool_conn_name);
ha_free(&check->sni);
ha_free(&check->alpn_str);