transport

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2023 License: Apache-2.0 Imports: 5 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.

func NewTransportHTTPZapLogger added in v0.0.28

func NewTransportHTTPZapLogger(
	l *logger.ZapLogger,
	transportType HTTPLoggerType,
) http.RoundTripper

NewTransportHTTPZapLogger 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"
)

type HTTPZapLogger added in v0.0.28

type HTTPZapLogger struct {
	http.RoundTripper

	Type HTTPLoggerType
	// contains filtered or unexported fields
}

HTTPZapLogger struct.

func (HTTPZapLogger) RoundTrip added in v0.0.28

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

RoundTrip logs transparently.

Jump to

Keyboard shortcuts

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