transport

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTransportHTTPLogger

func NewTransportHTTPLogger(
	entry *logrus.Entry,
	transportType TransportHTTPLoggerType,
) http.RoundTripper

NewTransportHTTPLogger get http.RoundTripper.

Types

type TransportHTTPLogger

type TransportHTTPLogger struct {
	http.RoundTripper
	Entry *logrus.Entry
	Type  TransportHTTPLoggerType
}

TransportHTTPLogger struct.

func (TransportHTTPLogger) RoundTrip

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

RoundTrip logs transparently.

type TransportHTTPLoggerType

type TransportHTTPLoggerType string

TransportHTTPLoggerType defines the transport type.

const (
	// TransportHTTPLoggerTypeExternal defines the external type.
	TransportHTTPLoggerTypeExternal TransportHTTPLoggerType = "external"
	// TransportHTTPLoggerTypeInternal defines the internal type.
	TransportHTTPLoggerTypeInternal TransportHTTPLoggerType = "internal"
)

Jump to

Keyboard shortcuts

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