aboutsummaryrefslogtreecommitdiff
path: root/_doc
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2022-05-13 21:14:29 +0700
committerShulhan <ms@kilabit.info>2022-05-13 21:14:29 +0700
commit20c3f80e7dfd9e453d757199beb2137c09a9f536 (patch)
tree82711df23adee40b578a4da395a9588877132d88 /_doc
parentc9de13ce2432dee7d58fb45c4cecbf026786a48d (diff)
downloadrescached-20c3f80e7dfd9e453d757199beb2137c09a9f536.tar.xz
cmd/resolver: implement command to delete record on hosts file
The command has the following signature, resolver hosts.d rr delete <name> <domain> Given the hosts name "hosts" and domain "my.hosts" it will delete all records that have domain name "my.hosts" inside the file.
Diffstat (limited to '_doc')
-rw-r--r--_doc/resolver.adoc30
1 files changed, 30 insertions, 0 deletions
diff --git a/_doc/resolver.adoc b/_doc/resolver.adoc
index f0d40de..9951ad5 100644
--- a/_doc/resolver.adoc
+++ b/_doc/resolver.adoc
@@ -181,6 +181,13 @@ instead of replaced.
--
+hosts.d rr delete <name> <domain>::
++
+--
+Delete record from hosts file "name" by domain name.
+--
+
+
== EXIT STATUS
Upon exit and success +resolver+ will return 0, or 1 otherwise.
@@ -188,6 +195,8 @@ Upon exit and success +resolver+ will return 0, or 1 otherwise.
== EXAMPLES
+=== QUERY EXAMPLES
+
Query the IPv4 address for kilabit.info,
$ resolver query kilabit.info
@@ -215,6 +224,9 @@ Inspect the rescached's caches on server at http://127.0.0.1:5380,
$ resolver -server=http://127.0.0.1:5380 caches
+
+=== MANAGING CACHES
+
Search caches that contains "bit" on the domain name,
$ resolver caches search bit
@@ -227,6 +239,9 @@ Remove all caches in the server,
$ resolver caches remove all
+
+=== MANAGING ENVIRONMENT
+
Fetch and print current server environment,
$ resolver env
@@ -239,6 +254,9 @@ Update the server environment by reading JSON from standard input,
$ cat /tmp/env.json | resolver env update -
+
+=== MANAGING HOSTS.D
+
Create new hosts file named "myhosts" inside the hosts.d directory,
$ resolver hosts.d create myhosts
@@ -269,6 +287,8 @@ Get the content of hosts file named "myhosts" inside the hosts.d directory,
}
]
+=== MANAGING RECORD ON HOSTS.D
+
Add new record "127.0.0.1 my.hosts" to hosts file named "hosts",
$ resolver hosts.d rr add hosts my.hosts 127.0.0.1
@@ -280,6 +300,16 @@ Add new record "127.0.0.1 my.hosts" to hosts file named "hosts",
"TTL": 604800
}
+Delete record "my.hosts" from hosts file "hosts",
+
+ $ resolver hosts.d rr delete hosts my.hosts
+ {
+ "Value": "127.0.0.1",
+ "Name": "my.hosts",
+ "Type": 1,
+ "Class": 1,
+ "TTL": 604800
+ }
== AUTHOR