3ba5626b95
Like before, do not touch the rest of the tree. Rather create compatibility types declared as legacy. We will soon be able to close idle connections for an HTTP3 transport using any kind of resolvers more easily. See https://github.com/ooni/probe/issues/1591
23 lines
654 B
Go
23 lines
654 B
Go
package mocks
|
|
|
|
import (
|
|
"context"
|
|
"crypto/tls"
|
|
|
|
"github.com/lucas-clemente/quic-go"
|
|
)
|
|
|
|
// QUICContextDialer is a mockable netxlite.QUICContextDialer.
|
|
//
|
|
// DEPRECATED: please use QUICDialer.
|
|
type QUICContextDialer struct {
|
|
MockDialContext func(ctx context.Context, network, address string,
|
|
tlsConfig *tls.Config, quicConfig *quic.Config) (quic.EarlySession, error)
|
|
}
|
|
|
|
// DialContext calls MockDialContext.
|
|
func (qcd *QUICContextDialer) DialContext(ctx context.Context, network, address string,
|
|
tlsConfig *tls.Config, quicConfig *quic.Config) (quic.EarlySession, error) {
|
|
return qcd.MockDialContext(ctx, network, address, tlsConfig, quicConfig)
|
|
}
|