gentleman.v2: gopkg.in/h2non/gentleman.v2/plugins/timeout Index | Files

package timeout

import "gopkg.in/h2non/gentleman.v2/plugins/timeout"

Index

Package Files

timeout.go

func All Uses

func All(timeouts Timeouts) p.Plugin

All defines all the timeout types for the outgoing request

func Dial Uses

func Dial(timeout, keepAlive time.Duration) p.Plugin

Dial defines the maximum amount of time waiting for network dialing

func Request Uses

func Request(timeout time.Duration) p.Plugin

Request defines the maximum amount of time a whole request process (including dial / request / redirect) can take.

func TLS Uses

func TLS(timeout time.Duration) p.Plugin

TLS defines the maximum amount of time waiting for a TLS handshake

type Timeouts Uses

type Timeouts struct {
    // Request represents the total timeout including dial / request / redirect steps
    Request time.Duration

    // TLS represents the maximum amount of time for TLS handshake process
    TLS time.Duration

    // Dial represents the maximum amount of time for dialing process
    Dial time.Duration

    // KeepAlive represents the maximum amount of time to keep alive the socket
    KeepAlive time.Duration
}

Timeouts represents the supported timeouts

Package timeout imports 6 packages (graph) and is imported by 5 packages. Updated 2020-02-23. Refresh now. Tools for package owners.