Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientTransportProperties ¶
type ClientTransportProperties struct { // MaxIdleConns see: https://golang.org/pkg/net/http/#Transport // Zero means no limit. MaxIdleConns int `yaml:"MaxIdleConns" validate:"min=0"` // MaxIdleConnsPerHost see: https://golang.org/pkg/net/http/#Transport // If zero, DefaultMaxIdleConnsPerHost is used. MaxIdleConnsPerHost int `yaml:"MaxIdleConnsPerHost" validate:"min=0"` // IdleConnTimeout see: https://golang.org/pkg/net/http/#Transport // Zero means no limit. IdleConnTimeout metrics.Interval `yaml:"IdleConnTimeout"` // ResponseHeaderTimeout see: https://golang.org/pkg/net/http/#Transport ResponseHeaderTimeout metrics.Interval `yaml:"ResponseHeaderTimeout"` // DisableKeepAlives see: https://golang.org/pkg/net/http/#Transport // Default false DisableKeepAlives bool `yaml:"DisableKeepAlives"` }
ClientTransportProperties details
type ClientTransportRules ¶
type ClientTransportRules struct { Method string `yaml:"Method" validate:"max=64"` Path string `yaml:"Path" validate:"max=64"` QueryParam string `yaml:"QueryParam" validate:"max=64"` }
ClientTransportRules properties
type CompiledRules ¶
type CompiledRules struct { MethodRegexp *regexp.Regexp PathRegexp *regexp.Regexp QueryParamRegexp *regexp.Regexp IsCompiled bool }
CompiledRules properties
type TransportMatcherDefinition ¶
type TransportMatcherDefinition struct { Name string `yaml:"Name"` Rules ClientTransportRules `yaml:"Rules"` CompiledRules CompiledRules Properties ClientTransportProperties `yaml:"Properties"` }
TransportMatcherDefinition properties
type Transports ¶
type Transports []TransportMatcherDefinition
Transports map with TransportMatcherDefinition
func (*Transports) GetMatchedTransportDefinition ¶
func (t *Transports) GetMatchedTransportDefinition(method, path, queryParam string) (matchedTransport TransportMatcherDefinition, ok bool)
GetMatchedTransportDefinition returns first details matching with rules from Rules by arguments: method, path, queryParam
Click to show internal directories.
Click to hide internal directories.