oldhttptransport

package
v3.13.0 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2021 License: GPL-3.0 Imports: 12 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 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