add metrics for dns
All checks were successful
test / test (push) Successful in 46s

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
2024-12-09 00:41:08 +03:00
parent d9b822deff
commit b6a0e4d983
7 changed files with 67 additions and 13 deletions

View File

@@ -34,7 +34,10 @@ func init() {
),
)
net.DefaultResolver = utildns.NewNetResolver(utildns.Timeout(1 * time.Second))
net.DefaultResolver = utildns.NewNetResolver(
utildns.Timeout(1*time.Second),
utildns.MinCacheTTL(5*time.Second),
)
}
// Service is an interface that wraps the lower level components.