transport

Imports

Imports #

"crypto/tls"
"crypto/x509"
"fmt"
"net/http"
"os"
"sync"
"github.com/google/pprof/internal/plugin"

Constants & Variables

extraUsage const #

const extraUsage = `    -tls_cert             TLS client certificate file for fetching profile and symbols
    -tls_key              TLS private key file for fetching profile and symbols
    -tls_ca               TLS CA certs file for fetching profile and symbols`

Structs

transport struct #

type transport struct {
cert *string
key *string
ca *string
caCertPool *x509.CertPool
certs []tls.Certificate
initOnce sync.Once
initErr error
}

Functions

New function #

New returns a round tripper for making requests with the specified cert, key, and ca. The flags tls_cert, tls_key, and tls_ca are added to the flagset to allow a user to specify the cert, key, and ca. If the flagset is nil, no flags will be added, and users will not be able to use these flags.

func New(flagset plugin.FlagSet) http.RoundTripper

RoundTrip method #

RoundTrip executes a single HTTP transaction, returning a Response for the provided Request.

func (tr *transport) RoundTrip(req *http.Request) (*http.Response, error)

initialize method #

initialize uses the cert, key, and ca to initialize the certs to use these when making requests.

func (tr *transport) initialize() error

Generated with Arrow