]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
[MINOR] Allow showing and clearing by key of string stick tables
authorSimon Horman <horms@verge.net.au>
Wed, 15 Jun 2011 06:18:52 +0000 (15:18 +0900)
committerWilly Tarreau <w@1wt.eu>
Fri, 17 Jun 2011 09:39:30 +0000 (11:39 +0200)
doc/configuration.txt
src/dumpstats.c

index f70a9522f5f127ddac011af40ffc416aae9a4257..f35971fa7c11525c9eb6448347627b97d2c52046 100644 (file)
@@ -9336,7 +9336,8 @@ clear table <table> [ data.<type> <operator> <value> ] | [ key <key> ]
     - gt : match entries whose data is greater than this value
 
   When the key form is used the entry <key> is removed.  The key must be of the
-  same type as the table, which currently is limited to IPv4, IPv6 and integer.
+  same type as the table, which currently is limited to IPv4, IPv6, integer and
+  string.
 
   Example :
         $ echo "show table http_proxy" | socat stdio /tmp/sock1
@@ -9562,7 +9563,8 @@ show table <name> [ data.<type> <operator> <value> ] | [ key <key> ]
 
 
   When the key form is used the entry <key> is shown.  The key must be of the
-  same type as the table, which currently is limited to IPv4, IPv6 and integer.
+  same type as the table, which currently is limited to IPv4, IPv6, integer,
+  and string.
 
   Example :
         $ echo "show table http_proxy" | socat stdio /tmp/sock1
index 45424dfa3cfbcf89b8a7ef23cccedad9aa865d08..f3619a7c053e04c419d7b9e983c8de0f4e3be1e5 100644 (file)
@@ -549,6 +549,10 @@ static void stats_sock_table_key_request(struct stream_interface *si, char **arg
                        break;
                }
                break;
+       case STKTABLE_TYPE_STRING:
+               static_table_key.key = args[4];
+               static_table_key.key_len = strlen(args[4]);
+               break;
        default:
                if (show)
                        si->applet.ctx.cli.msg = "Showing keys from tables of type other than ip, ipv6 and integer is not supported\n";