transport

package
v0.0.27 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTransportHTTPLogger

func NewTransportHTTPLogger(
	l *logger.Logger,
	transportType HTTPLoggerType,
) http.RoundTripper

NewTransportHTTPLogger get http.RoundTripper.

Types

type HTTPLogger added in v0.0.21

type HTTPLogger struct {
	http.RoundTripper

	Type HTTPLoggerType
	// contains filtered or unexported fields
}

HTTPLogger struct.

func (HTTPLogger) RoundTrip added in v0.0.21

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

RoundTrip logs transparently.

type HTTPLoggerType added in v0.0.21

type HTTPLoggerType string

HTTPLoggerType defines the transport type.

const (
	// HTTPLoggerTypeExternal defines the external type.
	HTTPLoggerTypeExternal HTTPLoggerType = "external"
	// HTTPLoggerTypeInternal defines the internal type.
	HTTPLoggerTypeInternal HTTPLoggerType = "internal"
)

Jump to

Keyboard shortcuts

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