oldhttptransport

package
v0.23.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 1, 2021 License: BSD-3-Clause Imports: 14 Imported by: 0

Documentation

Overview

Package oldhttptransport contains HTTP transport extensions. Here we define a http.Transport that emits events.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BodyTracer

type BodyTracer struct {
	Transport http.RoundTripper
}

BodyTracer performs single HTTP transactions and emits measurement events as they happen.

func NewBodyTracer

func NewBodyTracer(roundTripper http.RoundTripper) *BodyTracer

NewBodyTracer creates a new Transport.

func (*BodyTracer) CloseIdleConnections

func (t *BodyTracer) CloseIdleConnections()

CloseIdleConnections closes the idle connections.

func (*BodyTracer) RoundTrip

func (t *BodyTracer) RoundTrip(req *http.Request) (resp *http.Response, err error)

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

type TraceTripper

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

TraceTripper performs single HTTP transactions.

func NewTraceTripper

func NewTraceTripper(roundTripper http.RoundTripper) *TraceTripper

NewTraceTripper creates a new Transport.

func (*TraceTripper) CloseIdleConnections

func (t *TraceTripper) CloseIdleConnections()

CloseIdleConnections closes the idle connections.

func (*TraceTripper) RoundTrip

func (t *TraceTripper) RoundTrip(req *http.Request) (*http.Response, error)

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

type Transactioner

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

Transactioner performs single HTTP transactions.

func NewTransactioner

func NewTransactioner(roundTripper http.RoundTripper) *Transactioner

NewTransactioner creates a new Transport.

func (*Transactioner) CloseIdleConnections

func (t *Transactioner) CloseIdleConnections()

CloseIdleConnections closes the idle connections.

func (*Transactioner) RoundTrip

func (t *Transactioner) RoundTrip(req *http.Request) (*http.Response, error)

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

type Transport

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

Transport performs single HTTP transactions and emits measurement events as they happen.

func New

func New(roundTripper http.RoundTripper) *Transport

New creates a new Transport.

func (*Transport) CloseIdleConnections

func (t *Transport) CloseIdleConnections()

CloseIdleConnections closes the idle connections.

func (*Transport) RoundTrip

func (t *Transport) RoundTrip(req *http.Request) (resp *http.Response, err error)

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL