[MEDIUM] stats: add "show table [<name>]" to dump a stick-table
It is now possible to dump a table's contents with keys, expire,
use count, and various data using the command above on the stats
socket.
"show table" only shows main table stats, while "show table <name>"
dumps table contents, only if the socket level is admin.
diff --git a/include/types/session.h b/include/types/session.h
index 222c30f..f2f15c4 100644
--- a/include/types/session.h
+++ b/include/types/session.h
@@ -231,6 +231,11 @@
int bol; /* pointer to beginning of current line */
} errors;
struct {
+ void *target; /* table we want to dump, or NULL for all */
+ struct proxy *proxy; /* table being currently dumped (first if NULL) */
+ struct stksess *entry; /* last entry we were trying to dump (or first if NULL) */
+ } table;
+ struct {
const char *msg; /* pointer to a persistent message to be returned in PRINT state */
} cli;
} data_ctx; /* used by stats I/O handlers to dump the stats */