transport

package
v0.0.0-...-d88ec87 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigureHTTPTransports

func ConfigureHTTPTransports(clientConf httphandlerConfig.Client) (http.RoundTripper, error)

ConfigureHTTPTransports returns RoundTrippers mapped by transport name from configuration

Types

type DefinitionError

type DefinitionError struct {
	// contains filtered or unexported fields
}

DefinitionError properties for Transports

type Matcher

type Matcher struct {
	RoundTrippers    map[string]http.RoundTripper
	TransportsConfig config.Transports
}

Matcher mapping initialized Transports with http.RoundTripper by transport name

func (*Matcher) RoundTrip

func (m *Matcher) RoundTrip(request *http.Request) (response *http.Response, err error)

RoundTrip for transport matching

func (*Matcher) SelectTransportDefinition

func (m *Matcher) SelectTransportDefinition(method, path, queryParams string, log log.Logger) (matchedTransport config.TransportMatcherDefinition, err error)

SelectTransportDefinition returns transport instance by method, path and queryParams

func (*Matcher) SelectTransportRoundTripper

func (m *Matcher) SelectTransportRoundTripper(request *http.Request) (selectedRoundTripper http.RoundTripper, err error)

SelectTransportRoundTripper for selecting RoundTripper by request object from transports matcher

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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