dialsrv: github.com/koron-go/dialsrv Index | Files

package dialsrv

import "github.com/koron-go/dialsrv"

Index

Package Files

dial.go http.go

Variables

var HTTPClient = &http.Client{
    Transport: HTTPTransport,
}

HTTPClient is replacement for http.DefaultClient

var HTTPTransport = &http.Transport{
    Proxy: http.ProxyFromEnvironment,
    DialContext: New(&net.Dialer{
        Timeout:   30 * time.Second,
        KeepAlive: 30 * time.Second,
        DualStack: true,
    }).DialContext,
    MaxIdleConns:          100,
    IdleConnTimeout:       90 * time.Second,
    TLSHandshakeTimeout:   10 * time.Second,
    ExpectContinueTimeout: 1 * time.Second,
}

HTTPTransport is replacement for http.DefaultTransport

type Dialer Uses

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

Dialer wraps net.Dialer with SRV lookup.

func New Uses

func New(d *net.Dialer) *Dialer

New creates a new Dialer with base *net.Dialer.

func (*Dialer) Dial Uses

func (d *Dialer) Dial(network, address string) (net.Conn, error)

Dial connects to the address on the named network.

func (*Dialer) DialContext Uses

func (d *Dialer) DialContext(ctx context.Context, network, address string) (net.Conn, error)

DialContext connects to the address on the named network using the provided context.

type FlavoredAddr Uses

type FlavoredAddr struct {
    Network string
    Service string
    Proto   string
    Name    string
}

FlavoredAddr represents SRV flavored address.

func (*FlavoredAddr) String Uses

func (fa *FlavoredAddr) String() string

String returns FlavoredAddr's string representation.

Package dialsrv imports 7 packages (graph). Updated 2018-09-21. Refresh now. Tools for package owners. This is an inactive package (no imports and no commits in at least two years).