Versions in this module Expand all Collapse all v0 v0.0.1 Jan 7, 2021 Changes in this version + type Cache struct + func NewCache(expires time.Duration, limits Limits) *Cache + func (o *Cache) Clean() + func (o *Cache) Cleaned() time.Time + func (o *Cache) Dump(out io.Writer) + func (o *Cache) Expires() time.Duration + func (o *Cache) Flush() + func (o *Cache) Flushed() time.Time + func (o *Cache) Get(client, resolved net.IP, name string) (bool, time.Time) + func (o *Cache) Set(ts time.Time, client net.IP, name string, resolved []net.IP) error + func (o *Cache) Store() time.Time + type Limits struct + BlockSize int + MaxBlocksClient int + MaxNamesNode int + func DefaultLimits() Limits + type Option func(*options) + func DumpCache(d time.Duration, fname string) Option + func SetLogger(l yalogi.Logger) Option + func SetTraceLogger(l TraceLogger) Option + type Service struct + func NewService(c *Cache, opt ...Option) *Service + func (s *Service) Check(ctx context.Context, client, resolved net.IP, name string) (dnsutil.CacheResponse, error) + func (s *Service) Collect(ctx context.Context, client net.IP, name string, resolved []net.IP, ...) error + func (s *Service) Shutdown() + func (s *Service) Start() error + func (s *Service) Uptime(ctx context.Context) (time.Time, time.Duration, error) + type TraceLogger interface + LogCheck func(peer *peer.Peer, ts time.Time, client, resolved net.IP, name string, ...) error + LogCollect func(*peer.Peer, time.Time, net.IP, string, []net.IP, []string) error