mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-07 23:56:57 +02:00
[MINOR] Allow showing and clearing by key of string stick tables
This commit is contained in:
parent
cec9a22780
commit
619e3cc245
@ -9336,7 +9336,8 @@ clear table <table> [ data.<type> <operator> <value> ] | [ key <key> ]
|
|||||||
- gt : match entries whose data is greater than this value
|
- 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
|
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 :
|
Example :
|
||||||
$ echo "show table http_proxy" | socat stdio /tmp/sock1
|
$ 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
|
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 :
|
Example :
|
||||||
$ echo "show table http_proxy" | socat stdio /tmp/sock1
|
$ echo "show table http_proxy" | socat stdio /tmp/sock1
|
||||||
|
@ -549,6 +549,10 @@ static void stats_sock_table_key_request(struct stream_interface *si, char **arg
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case STKTABLE_TYPE_STRING:
|
||||||
|
static_table_key.key = args[4];
|
||||||
|
static_table_key.key_len = strlen(args[4]);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
if (show)
|
if (show)
|
||||||
si->applet.ctx.cli.msg = "Showing keys from tables of type other than ip, ipv6 and integer is not supported\n";
|
si->applet.ctx.cli.msg = "Showing keys from tables of type other than ip, ipv6 and integer is not supported\n";
|
||||||
|
Loading…
Reference in New Issue
Block a user