pool

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2026 License: Apache-2.0 Imports: 7 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Pool

type Pool struct {
	Conns    types.Conn
	Selector types.Selector
	// contains filtered or unexported fields
}

Pool is a managed pool of DNS nameservers.

func New

func New(qps int, sel types.Selector, conns types.Conn, logger *log.Logger) *Pool

New initializes a DNS nameserver pool.

func (*Pool) Exchange

func (r *Pool) Exchange(ctx context.Context, msg *dns.Msg) (*dns.Msg, error)

Exchange sends the DNS message and returns the response message.

func (*Pool) Query

func (r *Pool) Query(ctx context.Context, msg *dns.Msg, ch chan *dns.Msg)

Query sends the DNS message and returns the response on the provided channel.

func (*Pool) QueryChan

func (r *Pool) QueryChan(ctx context.Context, msg *dns.Msg) chan *dns.Msg

QueryChan sends the provided DNS message and the response is provided on the returned channel. The channel is buffered to prevent blocking.

func (*Pool) Stop

func (r *Pool) Stop()

Stop will release resources use by the pool.

Jump to

Keyboard shortcuts

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