transport

package
v0.0.0-...-f1bdcb5 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2020 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AgentRoundTripper

type AgentRoundTripper struct {
	Next http.RoundTripper
	// contains filtered or unexported fields
}

AgentRoundTripper implements the http.RoundTripper interface.

func NewAgent

func NewAgent(name string) *AgentRoundTripper

NewAgent is a constructor for AgentRoundTripper, that provides default transport.

func (*AgentRoundTripper) RoundTrip

func (s *AgentRoundTripper) RoundTrip(request *http.Request) (*http.Response, error)

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

func (*AgentRoundTripper) WithNext

func (s *AgentRoundTripper) WithNext(next RoundTripper) RoundTripper

WithNext can set next RoundTripper object

type RoundTripper

type RoundTripper interface {
	http.RoundTripper
	WithNext(next RoundTripper) RoundTripper
}

RoundTripper is the main interface, implements the http.RoundTripper interface with additional WithNext function

Jump to

Keyboard shortcuts

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