mocks

package
v3.17.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2023 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HTTP3RoundTripper

type HTTP3RoundTripper struct {
	MockRoundTrip func(req *http.Request) (*http.Response, error)
	MockClose     func() error
}

HTTP3RoundTripper allows mocking http3.RoundTripper.

func (*HTTP3RoundTripper) Close

func (txp *HTTP3RoundTripper) Close() error

Close calls MockClose.

func (*HTTP3RoundTripper) RoundTrip

func (txp *HTTP3RoundTripper) RoundTrip(req *http.Request) (*http.Response, error)

RoundTrip calls MockRoundTrip.

type QUICContextDialer

type QUICContextDialer struct {
	MockDialContext func(ctx context.Context, network, address string,
		tlsConfig *tls.Config, quicConfig *quic.Config) (quic.EarlyConnection, error)
}

QUICContextDialer is a mockable netxlite.QUICContextDialer.

DEPRECATED: please use QUICDialer.

func (*QUICContextDialer) DialContext

func (qcd *QUICContextDialer) DialContext(ctx context.Context, network, address string,
	tlsConfig *tls.Config, quicConfig *quic.Config) (quic.EarlyConnection, error)

DialContext calls MockDialContext.

Jump to

Keyboard shortcuts

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