diff options
| author | Shulhan <ms@kilabit.info> | 2022-05-29 00:50:05 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2022-06-09 23:50:27 +0700 |
| commit | b4e49485f815db682def487191c129f8904d85eb (patch) | |
| tree | 6b790b2e65b493682b0e10253fc028e4fce6c6c1 /rescached.go | |
| parent | 5c354863c9c6fcc080f2407e6f7adea41fa4371d (diff) | |
| download | rescached-b4e49485f815db682def487191c129f8904d85eb.tar.xz | |
go.mod: update to share module v0.38.0
This changes affect the dns Server where all caches related methods has
been moved to field Caches.
Diffstat (limited to 'rescached.go')
| -rw-r--r-- | rescached.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/rescached.go b/rescached.go index f8caf05..2c1b0ce 100644 --- a/rescached.go +++ b/rescached.go @@ -77,7 +77,7 @@ func (srv *Server) Start() (err error) { fcaches, err = os.Open(srv.env.pathFileCaches) if err == nil { // Load stored caches from file. - answers, err = srv.dns.CachesLoad(fcaches) + answers, err = srv.dns.Caches.ExternalLoad(fcaches) if err != nil { log.Printf("%s: %s", logp, err) } else { @@ -94,7 +94,7 @@ func (srv *Server) Start() (err error) { if err != nil { return err } - err = srv.dns.PopulateCachesByRR(hfile.Records, hfile.Path) + err = srv.dns.Caches.InternalPopulateRecords(hfile.Records, hfile.Path) if err != nil { return err } @@ -109,7 +109,7 @@ func (srv *Server) Start() (err error) { return fmt.Errorf("%s: %w", logp, err) } - err = srv.dns.PopulateCachesByRR(hfile.Records, hfile.Path) + err = srv.dns.Caches.InternalPopulateRecords(hfile.Records, hfile.Path) if err != nil { return fmt.Errorf("%s: %w", logp, err) } @@ -130,7 +130,7 @@ func (srv *Server) Start() (err error) { } for _, hfile = range srv.env.HostsFiles { - err = srv.dns.PopulateCachesByRR(hfile.Records, hfile.Path) + err = srv.dns.Caches.InternalPopulateRecords(hfile.Records, hfile.Path) if err != nil { return err } @@ -148,7 +148,7 @@ func (srv *Server) Start() (err error) { err = nil } for _, zone = range srv.env.Zones { - srv.dns.PopulateCaches(zone.Messages(), zone.Path) + srv.dns.Caches.InternalPopulate(zone.Messages(), zone.Path) } if len(srv.env.FileResolvConf) > 0 { @@ -205,7 +205,7 @@ func (srv *Server) Stop() { log.Printf("%s: %s", logp, err) return } - n, err = srv.dns.CachesSave(fcaches) + n, err = srv.dns.Caches.ExternalSave(fcaches) if err != nil { log.Printf("%s: %s", logp, err) // fall-through for Close. |
