sessionresolver

package
v0.20.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 12, 2020 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Overview

Package sessionresolver contains the resolver used by the session. This resolver uses Powerdns DoH by default and falls back on the system provided resolver if Powerdns DoH is not working.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Resolver

type Resolver struct {
	Primary         netx.DNSClient
	PrimaryFailure  *atomicx.Int64
	PrimaryQuery    *atomicx.Int64
	Fallback        netx.DNSClient
	FallbackFailure *atomicx.Int64
	FallbackQuery   *atomicx.Int64
}

Resolver is the session resolver.

func New

func New(config netx.Config) *Resolver

New creates a new session resolver.

func (*Resolver) Address

func (r *Resolver) Address() string

Address implements Resolver.Address

func (*Resolver) CloseIdleConnections

func (r *Resolver) CloseIdleConnections()

CloseIdleConnections closes the idle connections, if any

func (*Resolver) LookupHost

func (r *Resolver) LookupHost(ctx context.Context, hostname string) ([]string, error)

LookupHost implements Resolver.LookupHost

func (*Resolver) Network

func (r *Resolver) Network() string

Network implements Resolver.Network

func (*Resolver) Stats added in v0.20.0

func (r *Resolver) Stats() string

Stats returns stats about the session resolver.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL