sessionresolver

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2020 License: BSD-3-Clause Imports: 5 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
	Fallback        netx.DNSClient
	FallbackFailure *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

Jump to

Keyboard shortcuts

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