diff options
| -rw-r--r-- | blockd.go | 1 | ||||
| -rw-r--r-- | client.go | 3 | ||||
| -rw-r--r-- | cmd/rescached/main.go | 6 | ||||
| -rw-r--r-- | cmd/resolver/doc.go | 2 | ||||
| -rw-r--r-- | cmd/resolver/main.go | 5 | ||||
| -rw-r--r-- | cmd/resolverbench/main.go | 1 | ||||
| -rw-r--r-- | httpd.go | 8 | ||||
| -rw-r--r-- | rescached.go | 5 |
8 files changed, 19 insertions, 12 deletions
@@ -18,6 +18,7 @@ const ( lastUpdatedFormat = "2006-01-02 15:04:05 MST" ) +// Blockd define the container for each block.d section in configuration. type Blockd struct { lastUpdated time.Time @@ -176,6 +176,7 @@ func (cl *Client) Caches() (answers []*dns.Answer, err error) { return answers, nil } +// CachesRemove request to remove caches by its domain name. func (cl *Client) CachesRemove(q string) (listAnswer []*dns.Answer, err error) { var ( logp = "CachesRemove" @@ -523,7 +524,7 @@ func (cl *Client) ZonedDelete(name string) (zone *dns.Zone, err error) { return zone, nil } -// ZoneRecords fetch the zone records by its name. +// ZonedRecords fetch the zone records by its name. func (cl *Client) ZonedRecords(zone string) (zoneRecords dns.ZoneRecords, err error) { var ( logp = "ZonedRecords" diff --git a/cmd/rescached/main.go b/cmd/rescached/main.go index 6173943..e94be5e 100644 --- a/cmd/rescached/main.go +++ b/cmd/rescached/main.go @@ -1,6 +1,12 @@ // SPDX-FileCopyrightText: 2018 M. Shulhan <ms@kilabit.info> // SPDX-License-Identifier: GPL-3.0-or-later +// Program rescached server that caching internet name and address on local +// memory for speeding up DNS resolution. +// +// Rescached primary goal is only to caching DNS queries and answers, used by +// personal or small group of users, to minimize unneeded traffic to outside +// network. package main import ( diff --git a/cmd/resolver/doc.go b/cmd/resolver/doc.go index 03222c0..8396dec 100644 --- a/cmd/resolver/doc.go +++ b/cmd/resolver/doc.go @@ -2,7 +2,7 @@ // SPDX-License-Identifier: GPL-3.0-or-later /* -Command resolver is command line interface (CLI) for DNS and rescached server. +Program resolver is command line interface (CLI) for DNS and rescached server. # SYNOPSIS diff --git a/cmd/resolver/main.go b/cmd/resolver/main.go index c8e5fe7..848d679 100644 --- a/cmd/resolver/main.go +++ b/cmd/resolver/main.go @@ -36,9 +36,8 @@ const ( subCmdUpdate = "update" ) -var ( - Usage string // Contains usage of program, overwritten by build. -) +// Usage of program, overwritten by build. +var Usage string func main() { var ( diff --git a/cmd/resolverbench/main.go b/cmd/resolverbench/main.go index 3e35e24..0821d29 100644 --- a/cmd/resolverbench/main.go +++ b/cmd/resolverbench/main.go @@ -1,6 +1,7 @@ // SPDX-FileCopyrightText: 2018 M. Shulhan <ms@kilabit.info> // SPDX-License-Identifier: GPL-3.0-or-later +// Program resolverbench program to benchmark DNS server or resolver. package main import ( @@ -331,7 +331,7 @@ func (srv *Server) httpdRun() { // ... // } // } -func (srv *Server) httpApiBlockdList(epr *libhttp.EndpointRequest) (resBody []byte, err error) { +func (srv *Server) httpApiBlockdList(_ *libhttp.EndpointRequest) (resBody []byte, err error) { var ( res = libhttp.EndpointResponse{} ) @@ -495,7 +495,7 @@ func (srv *Server) httpApiBlockdFetch(epr *libhttp.EndpointRequest) (resBody []b return json.Marshal(&res) } -func (srv *Server) httpApiCaches(epr *libhttp.EndpointRequest) (resBody []byte, err error) { +func (srv *Server) httpApiCaches(_ *libhttp.EndpointRequest) (resBody []byte, err error) { var ( res = libhttp.EndpointResponse{} answers = srv.dns.Caches.ExternalLRU() @@ -580,7 +580,7 @@ func (srv *Server) httpApiCachesDelete(epr *libhttp.EndpointRequest) (resBody [] // { // "data": <Environment> // } -func (srv *Server) httpApiEnvironmentGet(epr *libhttp.EndpointRequest) (resBody []byte, err error) { +func (srv *Server) httpApiEnvironmentGet(_ *libhttp.EndpointRequest) (resBody []byte, err error) { var ( res = libhttp.EndpointResponse{} ) @@ -1138,7 +1138,7 @@ func (srv *Server) apiHostsdRecordDelete(epr *libhttp.EndpointRequest) (resbody // ... // } // } -func (srv *Server) apiZoned(epr *libhttp.EndpointRequest) (resb []byte, err error) { +func (srv *Server) apiZoned(_ *libhttp.EndpointRequest) (resb []byte, err error) { var ( res = libhttp.EndpointResponse{} ) diff --git a/rescached.go b/rescached.go index 494c936..c0ee3de 100644 --- a/rescached.go +++ b/rescached.go @@ -17,9 +17,8 @@ import ( "github.com/shuLhan/share/lib/memfs" ) -var ( - Version = `4.4.0` // Contains version of program, overwritten by build. -) +// Version of program, overwritten by build. +var Version = `4.4.0` // Server implement caching DNS server. type Server struct { |
