sessionresolver

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2020 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Overview

Package sessionresolver contains the resolver used by the session. This resolver uses Cloudflare DoH by default and falls back on the system provided resolver if Cloudflare 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         httptransport.DNSClient
	PrimaryFailure  *atomicx.Int64
	Fallback        httptransport.DNSClient
	FallbackFailure *atomicx.Int64
}

Resolver is the session resolver.

func New

func New(config httptransport.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