doq

package
v0.55.0 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2025 License: MIT Imports: 8 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client encapsulates and provides logic for querying DNS servers over QUIC. The client should be thread-safe. The client reuses single QUIC connection to the server, while creating multiple parallel QUIC streams.

func NewClient

func NewClient(addr string, opts ...Option) *Client

NewClient creates a new doq.Client used for sending DoQ queries.

func (*Client) Send

func (c *Client) Send(ctx context.Context, msg *dns.Msg) (*dns.Msg, error)

Send sends DNS request using DNS over QUIC.

type Option

type Option interface {
	// contains filtered or unexported methods
}

Option represents configuration options for doq.Client.

func WithConnectTimeout

func WithConnectTimeout(t time.Duration) Option

WithConnectTimeout is a configuration option that sets connect timeout for the doq.Client.

func WithReadTimeout

func WithReadTimeout(t time.Duration) Option

WithReadTimeout is a configuration option that sets read timeout for the doq.Client.

func WithTLSConfig

func WithTLSConfig(c *tls.Config) Option

WithTLSConfig is a configuration option that sets TLS configuration for the doq.Client.

func WithWriteTimeout

func WithWriteTimeout(t time.Duration) Option

WithWriteTimeout is a configuration option that sets write timeout for the doq.Client.

Jump to

Keyboard shortcuts

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