Reference
set map
Change the value of a map file entry.
Used by itself, the set map
command changes only one map entry at a time, and the change becomes effective immediately. If, on the other hand, you need to change multiple entries, and you need them to be applied all at the same time in one atomic change, submit them as part of a multiple-change transaction initiated with the prepare map
command and committed with the commit map
command. prepare map
and commit map
are available as of version 2.4r1
.
Description Jump to heading
Use set map
to find an entry in a map file and replace its value.
Examples Jump to heading
Pass to the set map
command the map’s ID, the key in the map to find, and a value that should replace the existing value.
Alternatively, use the map file’s path instead of its ID.
In the example below, we replace the value cart_api
with web_servers
for the key /cart/
:
nix
echo "set map #0 /cart/ web_servers" | \sudo socat stdio tcp4-connect:127.0.0.1:9999
nix
echo "set map #0 /cart/ web_servers" | \sudo socat stdio tcp4-connect:127.0.0.1:9999
See also Jump to heading
Do you have any suggestions on how we can improve the content of this page?