Documentation
¶
Index ¶
- Variables
- func InferServiceFromHost(host string) string
- func NewAWSSigv4Transport(config AWSSigv4Config, transport http.RoundTripper) http.RoundTripper
- func NewOauthTransport(config OauthConfig) *oauthRoundTripper
- func NewTracedTransport(config TraceConfig) *traceTransport
- type AWSSigv4Config
- type AuthStyle
- type Middleware
- type OauthConfig
- type RoundTripperFunc
- type TraceConfig
Constants ¶
This section is empty.
Variables ¶
View Source
var AuthStyleAutoDetect = AuthStyle(oauth2.AuthStyleAutoDetect)
View Source
var AuthStyleInHeader = AuthStyle(oauth2.AuthStyleInHeader)
View Source
var AuthStyleInParams = AuthStyle(oauth2.AuthStyleInParams)
Functions ¶
func InferServiceFromHost ¶ added in v1.45.0
func NewAWSSigv4Transport ¶ added in v1.45.0
func NewAWSSigv4Transport(config AWSSigv4Config, transport http.RoundTripper) http.RoundTripper
func NewOauthTransport ¶ added in v1.15.0
func NewOauthTransport(config OauthConfig) *oauthRoundTripper
func NewTracedTransport ¶
func NewTracedTransport(config TraceConfig) *traceTransport
Types ¶
type AWSSigv4Config ¶ added in v1.45.0
type Middleware ¶ added in v1.16.0
type Middleware func(http.RoundTripper) http.RoundTripper
func NewLogger ¶ added in v1.16.0
func NewLogger(config TraceConfig) Middleware
type OauthConfig ¶ added in v1.17.0
type OauthConfig struct {
ClientID string
ClientSecret string
TokenURL string
Scopes []string
Params map[string]string
AuthStyle AuthStyle
Tracer func(msg string)
// TokenTransport wraps the HTTP transport used for OAuth token requests.
// When set, the token fetch HTTP call is routed through this middleware,
// allowing HAR capture of the token request without a circular import.
TokenTransport Middleware
}
func (*OauthConfig) AuthStyleInHeader ¶ added in v1.17.0
func (c *OauthConfig) AuthStyleInHeader() *OauthConfig
func (*OauthConfig) AuthStyleInParams ¶ added in v1.17.0
func (c *OauthConfig) AuthStyleInParams() *OauthConfig
func (OauthConfig) Pretty ¶ added in v1.46.0
func (c OauthConfig) Pretty() api.Text
func (OauthConfig) String ¶ added in v1.17.0
func (c OauthConfig) String() string
type RoundTripperFunc ¶ added in v1.15.0
type TraceConfig ¶ added in v1.15.0
type TraceConfig struct {
// SpanName is an optional name for the span.
// If not provided, the hostname of the requesting URL will be used.
SpanName string
// A list of patterns for headers which should be redacted in the trace.
RedactedHeaders []string
// MaxBodyLength is the max size of the body, in bytes, that will be traced.
// If the response body is larger than this, it will not be traced at all.
//
// Default: 4096 (4MB)
MaxBodyLength int64
// Body controls whether the request Body is traced
Body bool
// Response controls whether the Response body is traced
Response bool
// ResponseHeaders controls whether the response headers are traced
ResponseHeaders bool
// QueryParam controls whether the query parameters are traced
QueryParam bool
// Headers controls whether the Headers are traced
Headers bool
// TLS connection information
TLS bool
Timing bool
// Auth controls whether auth middleware (AWS SigV4, OAuth) logs trace messages
Auth bool
}
Click to show internal directories.
Click to hide internal directories.