By type
+ curl http://consul:8500/v1/agent/services
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 2 100 2 0 0 500 0 --:--:-- --:--:-- --:--:-- 500
++ curl -Ss '{http://consul:8500}/v1/status/leader'
+ [[ "10.233.70.204:8300" != \"\" ]]
+ (( 2 ))
+ case $1 in
+ kv=(${2//|/ })
+ put_key policy_handler /phconfig/config.json
+ curl -v -X PUT --data-binary @/phconfig/config.json -H 'Content-Type: application/json' http://consul:8500/v1/kv/policy_handler
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Trying 10.233.78.136:8500...
* Connected to consul (10.233.78.136) port 8500 (#0)
> PUT /v1/kv/policy_handler HTTP/1.1
> Host: consul:8500
> User-Agent: curl/7.69.1
> Accept: */*
> Content-Type: application/json
> Content-Length: 1337
>
} [1337 bytes data]
* upload completely sent off: 1337 out of 1337 bytes
100 1337 0 0 100 1337 0 1112 0:00:01 0:00:01 --:--:-- 1112
100 1337 0 0 100 1337 0 606 0:00:02 0:00:02 --:--:-- 606
100 1337 0 0 100 1337 0 417 0:00:03 0:00:03 --:--:-- 417
100 1337 0 0 100 1337 0 317 0:00:04 0:00:04 --:--:-- 317
100 1337 0 0 100 1337 0 256 0:00:05 0:00:05 --:--:-- 256
100 1337 0 0 100 1337 0 215 0:00:06 0:00:06 --:--:-- 0
100 1337 0 0 100 1337 0 185 0:00:07 0:00:07 --:--:-- 0
100 1337 0 0 100 1337 0 162 0:00:08 0:00:08 --:--:-- 0
100 1337 0 0 100 1337 0 145 0:00:09 0:00:09 --:--:-- 0
100 1337 0 0 100 1337 0 130 0:00:10 0:00:10 --:--:-- 0* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< Content-Type: application/json
< Date: Sat, 08 May 2021 01:04:05 GMT
< Content-Length: 4
<
{ [4 bytes data]
100 1341 0 4 100 1337 0 128 0:00:10 0:00:10 --:--:-- 0
* Connection #0 to host consul left intact
+ shift 2
+ (( 0 ))
{}true