ooni-probe-cli/internal/netxlite/mocks/legacy.go

23 lines
654 B
Go
Raw Normal View History

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)
}