Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RetryDialer ¶
RetryDialer retries the Dial function until it succeeds or the timeout has been reached. The default timeout is one second and the default sleep interval is 100ms.
func NewRetryDialer ¶
func NewRetryDialer() *RetryDialer
type Server ¶
type Server struct {
// Addr is the address the server is listening on in the form ipaddr:port.
Addr string
Listener net.Listener
// TLS is the optional TLS configuration, populated with a new config
// after TLS is started. If set on an unstarted server before StartTLS
// is called, existing fields are copied into the new config.
TLS *tls.Config
// Config may be changed after calling NewUnstartedServer and
// before Start or StartTLS.
Config *tcp.Server
// contains filtered or unexported fields
}
Server is a TCP test server that binds to a random port.
func NewTLSServer ¶
func NewUnstartedServer ¶
type TLSRetryDialer ¶
type TLSRetryDialer struct {
TLS *tls.Config
Dialer net.Dialer
Timeout time.Duration
Sleep time.Duration
}
func NewTLSRetryDialer ¶
func NewTLSRetryDialer(cfg *tls.Config) *TLSRetryDialer
Click to show internal directories.
Click to hide internal directories.