Documentation ¶
Index ¶
- func NewRefreshableTransport(ctx context.Context, p RefreshableTransportParams, tlsProvider TLSProvider, ...) http.RoundTripper
- func NewTLSConfig(ctx context.Context, p TLSParams) (*tls.Config, error)
- type BasicAuth
- type ContextDialer
- type DialerParams
- type RefreshableBasicAuth
- type RefreshableBasicAuthPtr
- type RefreshableDialer
- type RefreshableDialerParams
- type RefreshableHTTPClient
- type RefreshableRetryParams
- type RefreshableTLSConfig
- type RefreshableTLSParams
- type RefreshableTag
- type RefreshableTagSlice
- type RefreshableTags
- type RefreshableTransport
- type RefreshableTransportParams
- type RefreshableValidatedClientParams
- type RefreshingBasicAuth
- func (r RefreshingBasicAuth) CurrentBasicAuth() BasicAuth
- func (r RefreshingBasicAuth) MapBasicAuth(mapFn func(BasicAuth) interface{}) refreshable.Refreshable
- func (r RefreshingBasicAuth) Password() refreshable.String
- func (r RefreshingBasicAuth) SubscribeToBasicAuth(consumer func(BasicAuth)) (unsubscribe func())
- func (r RefreshingBasicAuth) User() refreshable.String
- type RefreshingBasicAuthPtr
- func (r RefreshingBasicAuthPtr) CurrentBasicAuthPtr() *BasicAuth
- func (r RefreshingBasicAuthPtr) MapBasicAuthPtr(mapFn func(*BasicAuth) interface{}) refreshable.Refreshable
- func (r RefreshingBasicAuthPtr) Password() refreshable.String
- func (r RefreshingBasicAuthPtr) SubscribeToBasicAuthPtr(consumer func(*BasicAuth)) (unsubscribe func())
- func (r RefreshingBasicAuthPtr) User() refreshable.String
- type RefreshingDialerParams
- func (r RefreshingDialerParams) CurrentDialerParams() DialerParams
- func (r RefreshingDialerParams) DialTimeout() refreshable.Duration
- func (r RefreshingDialerParams) KeepAlive() refreshable.Duration
- func (r RefreshingDialerParams) MapDialerParams(mapFn func(DialerParams) interface{}) refreshable.Refreshable
- func (r RefreshingDialerParams) SubscribeToDialerParams(consumer func(DialerParams)) (unsubscribe func())
- type RefreshingRetryParams
- func (r RefreshingRetryParams) CurrentRetryParams() RetryParams
- func (r RefreshingRetryParams) InitialBackoff() refreshable.Duration
- func (r RefreshingRetryParams) MapRetryParams(mapFn func(RetryParams) interface{}) refreshable.Refreshable
- func (r RefreshingRetryParams) MaxBackoff() refreshable.Duration
- func (r RefreshingRetryParams) SubscribeToRetryParams(consumer func(RetryParams)) (unsubscribe func())
- type RefreshingTLSParams
- func (r RefreshingTLSParams) CAFiles() refreshable.StringSlice
- func (r RefreshingTLSParams) CertFile() refreshable.String
- func (r RefreshingTLSParams) CurrentTLSParams() TLSParams
- func (r RefreshingTLSParams) InsecureSkipVerify() refreshable.Bool
- func (r RefreshingTLSParams) KeyFile() refreshable.String
- func (r RefreshingTLSParams) MapTLSParams(mapFn func(TLSParams) interface{}) refreshable.Refreshable
- func (r RefreshingTLSParams) SubscribeToTLSParams(consumer func(TLSParams)) (unsubscribe func())
- type RefreshingTag
- type RefreshingTagSlice
- type RefreshingTags
- type RefreshingTransportParams
- func (r RefreshingTransportParams) CurrentTransportParams() TransportParams
- func (r RefreshingTransportParams) DisableHTTP2() refreshable.Bool
- func (r RefreshingTransportParams) DisableKeepAlives() refreshable.Bool
- func (r RefreshingTransportParams) ExpectContinueTimeout() refreshable.Duration
- func (r RefreshingTransportParams) HTTP2PingTimeout() refreshable.Duration
- func (r RefreshingTransportParams) HTTP2ReadIdleTimeout() refreshable.Duration
- func (r RefreshingTransportParams) IdleConnTimeout() refreshable.Duration
- func (r RefreshingTransportParams) MapTransportParams(mapFn func(TransportParams) interface{}) refreshable.Refreshable
- func (r RefreshingTransportParams) MaxIdleConns() refreshable.Int
- func (r RefreshingTransportParams) MaxIdleConnsPerHost() refreshable.Int
- func (r RefreshingTransportParams) ProxyFromEnvironment() refreshable.Bool
- func (r RefreshingTransportParams) ResponseHeaderTimeout() refreshable.Duration
- func (r RefreshingTransportParams) SubscribeToTransportParams(consumer func(TransportParams)) (unsubscribe func())
- func (r RefreshingTransportParams) TLS() RefreshableTLSParams
- func (r RefreshingTransportParams) TLSHandshakeTimeout() refreshable.Duration
- type RefreshingValidatedClientParams
- func (r RefreshingValidatedClientParams) APIToken() refreshable.StringPtr
- func (r RefreshingValidatedClientParams) BasicAuth() RefreshableBasicAuthPtr
- func (r RefreshingValidatedClientParams) CurrentValidatedClientParams() ValidatedClientParams
- func (r RefreshingValidatedClientParams) Dialer() RefreshableDialerParams
- func (r RefreshingValidatedClientParams) DisableMetrics() refreshable.Bool
- func (r RefreshingValidatedClientParams) MapValidatedClientParams(mapFn func(ValidatedClientParams) interface{}) refreshable.Refreshable
- func (r RefreshingValidatedClientParams) MaxAttempts() refreshable.IntPtr
- func (r RefreshingValidatedClientParams) MetricsTags() RefreshableTags
- func (r RefreshingValidatedClientParams) Retry() RefreshableRetryParams
- func (r RefreshingValidatedClientParams) ServiceName() refreshable.String
- func (r RefreshingValidatedClientParams) SubscribeToValidatedClientParams(consumer func(ValidatedClientParams)) (unsubscribe func())
- func (r RefreshingValidatedClientParams) Timeout() refreshable.Duration
- func (r RefreshingValidatedClientParams) Transport() RefreshableTransportParams
- func (r RefreshingValidatedClientParams) URIs() refreshable.StringSlice
- type RetryParams
- type StaticTLSConfigProvider
- type TLSParams
- type TLSProvider
- type TransportParams
- type ValidatedClientParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewRefreshableTransport ¶
func NewRefreshableTransport(ctx context.Context, p RefreshableTransportParams, tlsProvider TLSProvider, dialer ContextDialer) http.RoundTripper
Types ¶
type BasicAuth ¶ added in v2.49.0
BasicAuth represents the configuration for HTTP Basic Authorization
type ContextDialer ¶
type ContextDialer interface {
DialContext(ctx context.Context, network, address string) (net.Conn, error)
}
ContextDialer is the interface implemented by net.Dialer, proxy.Dialer, and others
func NewRefreshableDialer ¶
func NewRefreshableDialer(ctx context.Context, p RefreshableDialerParams) ContextDialer
type DialerParams ¶
type RefreshableBasicAuth ¶ added in v2.49.0
type RefreshableBasicAuth interface { refreshable.Refreshable CurrentBasicAuth() BasicAuth MapBasicAuth(func(BasicAuth) interface{}) refreshable.Refreshable SubscribeToBasicAuth(func(BasicAuth)) (unsubscribe func()) User() refreshable.String Password() refreshable.String }
type RefreshableBasicAuthPtr ¶ added in v2.49.0
type RefreshableBasicAuthPtr interface { refreshable.Refreshable CurrentBasicAuthPtr() *BasicAuth MapBasicAuthPtr(func(*BasicAuth) interface{}) refreshable.Refreshable SubscribeToBasicAuthPtr(func(*BasicAuth)) (unsubscribe func()) User() refreshable.String Password() refreshable.String }
type RefreshableDialer ¶
type RefreshableDialer struct {
refreshable.Refreshable // contains ContextDialer
}
func (*RefreshableDialer) DialContext ¶
type RefreshableDialerParams ¶
type RefreshableDialerParams interface { refreshable.Refreshable CurrentDialerParams() DialerParams MapDialerParams(func(DialerParams) interface{}) refreshable.Refreshable SubscribeToDialerParams(func(DialerParams)) (unsubscribe func()) DialTimeout() refreshable.Duration KeepAlive() refreshable.Duration }
func ConfigureDialer ¶
func ConfigureDialer(r RefreshableDialerParams, mapFn func(p DialerParams) DialerParams) RefreshableDialerParams
ConfigureDialer accepts a mapping function which will be applied to the params value as it is evaluated. This can be used to layer/overwrite configuration before building the RefreshableDialer.
type RefreshableHTTPClient ¶
type RefreshableHTTPClient interface { refreshable.Refreshable CurrentHTTPClient() *http.Client }
func NewRefreshableHTTPClient ¶
func NewRefreshableHTTPClient(rt http.RoundTripper, timeout refreshable.Duration) RefreshableHTTPClient
type RefreshableRetryParams ¶
type RefreshableRetryParams interface { refreshable.Refreshable CurrentRetryParams() RetryParams MapRetryParams(func(RetryParams) interface{}) refreshable.Refreshable SubscribeToRetryParams(func(RetryParams)) (unsubscribe func()) InitialBackoff() refreshable.Duration MaxBackoff() refreshable.Duration }
func ConfigureRetry ¶
func ConfigureRetry(r RefreshableRetryParams, mapFn func(p RetryParams) RetryParams) RefreshableRetryParams
ConfigureRetry accepts a mapping function which will be applied to the params value as it is evaluated. This can be used to layer/overwrite configuration before building the RefreshableRetryParams.
type RefreshableTLSConfig ¶ added in v2.82.0
type RefreshableTLSConfig struct {
// contains filtered or unexported fields
}
func (RefreshableTLSConfig) GetTLSConfig ¶ added in v2.82.0
func (r RefreshableTLSConfig) GetTLSConfig(ctx context.Context) *tls.Config
GetTLSConfig returns the most recent valid *tls.Config. If the last refreshable update resulted in an error, that error is logged and the previous value is returned.
type RefreshableTLSParams ¶ added in v2.82.0
type RefreshableTLSParams interface { refreshable.Refreshable CurrentTLSParams() TLSParams MapTLSParams(func(TLSParams) interface{}) refreshable.Refreshable SubscribeToTLSParams(func(TLSParams)) (unsubscribe func()) CAFiles() refreshable.StringSlice CertFile() refreshable.String KeyFile() refreshable.String InsecureSkipVerify() refreshable.Bool }
type RefreshableTag ¶
type RefreshableTag interface { refreshable.Refreshable CurrentTag() metrics.Tag MapTag(func(metrics.Tag) interface{}) refreshable.Refreshable SubscribeToTag(func(metrics.Tag)) (unsubscribe func()) }
type RefreshableTagSlice ¶
type RefreshableTagSlice interface { refreshable.Refreshable CurrentTagSlice() []metrics.Tag MapTagSlice(func([]metrics.Tag) interface{}) refreshable.Refreshable SubscribeToTagSlice(func([]metrics.Tag)) (unsubscribe func()) }
type RefreshableTags ¶
type RefreshableTags interface { refreshable.Refreshable CurrentTags() metrics.Tags MapTags(func(metrics.Tags) interface{}) refreshable.Refreshable SubscribeToTags(func(metrics.Tags)) (unsubscribe func()) }
type RefreshableTransport ¶
type RefreshableTransport struct {
refreshable.Refreshable // contains *http.Transport
}
RefreshableTransport implements http.RoundTripper backed by a refreshable *http.Transport. The transport and internal dialer are each rebuilt when any of their respective parameters are updated.
type RefreshableTransportParams ¶
type RefreshableTransportParams interface { refreshable.Refreshable CurrentTransportParams() TransportParams MapTransportParams(func(TransportParams) interface{}) refreshable.Refreshable SubscribeToTransportParams(func(TransportParams)) (unsubscribe func()) MaxIdleConns() refreshable.Int MaxIdleConnsPerHost() refreshable.Int DisableHTTP2() refreshable.Bool DisableKeepAlives() refreshable.Bool IdleConnTimeout() refreshable.Duration ExpectContinueTimeout() refreshable.Duration ResponseHeaderTimeout() refreshable.Duration TLSHandshakeTimeout() refreshable.Duration ProxyFromEnvironment() refreshable.Bool HTTP2ReadIdleTimeout() refreshable.Duration HTTP2PingTimeout() refreshable.Duration TLS() RefreshableTLSParams }
func ConfigureTransport ¶
func ConfigureTransport(r RefreshableTransportParams, mapFn func(p TransportParams) TransportParams) RefreshableTransportParams
ConfigureTransport accepts a mapping function which will be applied to the params value as it is evaluated. This can be used to layer/overwrite configuration before building the RefreshableTransportParams.
type RefreshableValidatedClientParams ¶
type RefreshableValidatedClientParams interface { refreshable.Refreshable CurrentValidatedClientParams() ValidatedClientParams MapValidatedClientParams(func(ValidatedClientParams) interface{}) refreshable.Refreshable SubscribeToValidatedClientParams(func(ValidatedClientParams)) (unsubscribe func()) APIToken() refreshable.StringPtr BasicAuth() RefreshableBasicAuthPtr Dialer() RefreshableDialerParams DisableMetrics() refreshable.Bool MaxAttempts() refreshable.IntPtr MetricsTags() RefreshableTags Retry() RefreshableRetryParams ServiceName() refreshable.String Timeout() refreshable.Duration Transport() RefreshableTransportParams URIs() refreshable.StringSlice }
type RefreshingBasicAuth ¶ added in v2.49.0
type RefreshingBasicAuth struct {
refreshable.Refreshable
}
func NewRefreshingBasicAuth ¶ added in v2.49.0
func NewRefreshingBasicAuth(in refreshable.Refreshable) RefreshingBasicAuth
func (RefreshingBasicAuth) CurrentBasicAuth ¶ added in v2.49.0
func (r RefreshingBasicAuth) CurrentBasicAuth() BasicAuth
func (RefreshingBasicAuth) MapBasicAuth ¶ added in v2.49.0
func (r RefreshingBasicAuth) MapBasicAuth(mapFn func(BasicAuth) interface{}) refreshable.Refreshable
func (RefreshingBasicAuth) Password ¶ added in v2.49.0
func (r RefreshingBasicAuth) Password() refreshable.String
func (RefreshingBasicAuth) SubscribeToBasicAuth ¶ added in v2.49.0
func (r RefreshingBasicAuth) SubscribeToBasicAuth(consumer func(BasicAuth)) (unsubscribe func())
func (RefreshingBasicAuth) User ¶ added in v2.49.0
func (r RefreshingBasicAuth) User() refreshable.String
type RefreshingBasicAuthPtr ¶ added in v2.49.0
type RefreshingBasicAuthPtr struct {
refreshable.Refreshable
}
func NewRefreshingBasicAuthPtr ¶ added in v2.49.0
func NewRefreshingBasicAuthPtr(in refreshable.Refreshable) RefreshingBasicAuthPtr
func (RefreshingBasicAuthPtr) CurrentBasicAuthPtr ¶ added in v2.49.0
func (r RefreshingBasicAuthPtr) CurrentBasicAuthPtr() *BasicAuth
func (RefreshingBasicAuthPtr) MapBasicAuthPtr ¶ added in v2.49.0
func (r RefreshingBasicAuthPtr) MapBasicAuthPtr(mapFn func(*BasicAuth) interface{}) refreshable.Refreshable
func (RefreshingBasicAuthPtr) Password ¶ added in v2.49.0
func (r RefreshingBasicAuthPtr) Password() refreshable.String
func (RefreshingBasicAuthPtr) SubscribeToBasicAuthPtr ¶ added in v2.49.0
func (r RefreshingBasicAuthPtr) SubscribeToBasicAuthPtr(consumer func(*BasicAuth)) (unsubscribe func())
func (RefreshingBasicAuthPtr) User ¶ added in v2.49.0
func (r RefreshingBasicAuthPtr) User() refreshable.String
type RefreshingDialerParams ¶
type RefreshingDialerParams struct {
refreshable.Refreshable
}
func NewRefreshingDialerParams ¶
func NewRefreshingDialerParams(in refreshable.Refreshable) RefreshingDialerParams
func (RefreshingDialerParams) CurrentDialerParams ¶
func (r RefreshingDialerParams) CurrentDialerParams() DialerParams
func (RefreshingDialerParams) DialTimeout ¶
func (r RefreshingDialerParams) DialTimeout() refreshable.Duration
func (RefreshingDialerParams) KeepAlive ¶
func (r RefreshingDialerParams) KeepAlive() refreshable.Duration
func (RefreshingDialerParams) MapDialerParams ¶
func (r RefreshingDialerParams) MapDialerParams(mapFn func(DialerParams) interface{}) refreshable.Refreshable
func (RefreshingDialerParams) SubscribeToDialerParams ¶
func (r RefreshingDialerParams) SubscribeToDialerParams(consumer func(DialerParams)) (unsubscribe func())
type RefreshingRetryParams ¶
type RefreshingRetryParams struct {
refreshable.Refreshable
}
func NewRefreshingRetryParams ¶
func NewRefreshingRetryParams(in refreshable.Refreshable) RefreshingRetryParams
func (RefreshingRetryParams) CurrentRetryParams ¶
func (r RefreshingRetryParams) CurrentRetryParams() RetryParams
func (RefreshingRetryParams) InitialBackoff ¶
func (r RefreshingRetryParams) InitialBackoff() refreshable.Duration
func (RefreshingRetryParams) MapRetryParams ¶
func (r RefreshingRetryParams) MapRetryParams(mapFn func(RetryParams) interface{}) refreshable.Refreshable
func (RefreshingRetryParams) MaxBackoff ¶
func (r RefreshingRetryParams) MaxBackoff() refreshable.Duration
func (RefreshingRetryParams) SubscribeToRetryParams ¶
func (r RefreshingRetryParams) SubscribeToRetryParams(consumer func(RetryParams)) (unsubscribe func())
type RefreshingTLSParams ¶ added in v2.82.0
type RefreshingTLSParams struct {
refreshable.Refreshable
}
func NewRefreshingTLSParams ¶ added in v2.82.0
func NewRefreshingTLSParams(in refreshable.Refreshable) RefreshingTLSParams
func (RefreshingTLSParams) CAFiles ¶ added in v2.82.0
func (r RefreshingTLSParams) CAFiles() refreshable.StringSlice
func (RefreshingTLSParams) CertFile ¶ added in v2.82.0
func (r RefreshingTLSParams) CertFile() refreshable.String
func (RefreshingTLSParams) CurrentTLSParams ¶ added in v2.82.0
func (r RefreshingTLSParams) CurrentTLSParams() TLSParams
func (RefreshingTLSParams) InsecureSkipVerify ¶ added in v2.82.0
func (r RefreshingTLSParams) InsecureSkipVerify() refreshable.Bool
func (RefreshingTLSParams) KeyFile ¶ added in v2.82.0
func (r RefreshingTLSParams) KeyFile() refreshable.String
func (RefreshingTLSParams) MapTLSParams ¶ added in v2.82.0
func (r RefreshingTLSParams) MapTLSParams(mapFn func(TLSParams) interface{}) refreshable.Refreshable
func (RefreshingTLSParams) SubscribeToTLSParams ¶ added in v2.82.0
func (r RefreshingTLSParams) SubscribeToTLSParams(consumer func(TLSParams)) (unsubscribe func())
type RefreshingTag ¶
type RefreshingTag struct {
refreshable.Refreshable
}
func NewRefreshingTag ¶
func NewRefreshingTag(in refreshable.Refreshable) RefreshingTag
func (RefreshingTag) CurrentTag ¶
func (r RefreshingTag) CurrentTag() metrics.Tag
func (RefreshingTag) MapTag ¶
func (r RefreshingTag) MapTag(mapFn func(metrics.Tag) interface{}) refreshable.Refreshable
func (RefreshingTag) SubscribeToTag ¶
func (r RefreshingTag) SubscribeToTag(consumer func(metrics.Tag)) (unsubscribe func())
type RefreshingTagSlice ¶
type RefreshingTagSlice struct {
refreshable.Refreshable
}
func NewRefreshingTagSlice ¶
func NewRefreshingTagSlice(in refreshable.Refreshable) RefreshingTagSlice
func (RefreshingTagSlice) CurrentTagSlice ¶
func (r RefreshingTagSlice) CurrentTagSlice() []metrics.Tag
func (RefreshingTagSlice) MapTagSlice ¶
func (r RefreshingTagSlice) MapTagSlice(mapFn func([]metrics.Tag) interface{}) refreshable.Refreshable
func (RefreshingTagSlice) SubscribeToTagSlice ¶
func (r RefreshingTagSlice) SubscribeToTagSlice(consumer func([]metrics.Tag)) (unsubscribe func())
type RefreshingTags ¶
type RefreshingTags struct {
refreshable.Refreshable
}
func NewRefreshingTags ¶
func NewRefreshingTags(in refreshable.Refreshable) RefreshingTags
func (RefreshingTags) CurrentTags ¶
func (r RefreshingTags) CurrentTags() metrics.Tags
func (RefreshingTags) MapTags ¶
func (r RefreshingTags) MapTags(mapFn func(metrics.Tags) interface{}) refreshable.Refreshable
func (RefreshingTags) SubscribeToTags ¶
func (r RefreshingTags) SubscribeToTags(consumer func(metrics.Tags)) (unsubscribe func())
type RefreshingTransportParams ¶
type RefreshingTransportParams struct {
refreshable.Refreshable
}
func NewRefreshingTransportParams ¶
func NewRefreshingTransportParams(in refreshable.Refreshable) RefreshingTransportParams
func (RefreshingTransportParams) CurrentTransportParams ¶
func (r RefreshingTransportParams) CurrentTransportParams() TransportParams
func (RefreshingTransportParams) DisableHTTP2 ¶
func (r RefreshingTransportParams) DisableHTTP2() refreshable.Bool
func (RefreshingTransportParams) DisableKeepAlives ¶
func (r RefreshingTransportParams) DisableKeepAlives() refreshable.Bool
func (RefreshingTransportParams) ExpectContinueTimeout ¶
func (r RefreshingTransportParams) ExpectContinueTimeout() refreshable.Duration
func (RefreshingTransportParams) HTTP2PingTimeout ¶
func (r RefreshingTransportParams) HTTP2PingTimeout() refreshable.Duration
func (RefreshingTransportParams) HTTP2ReadIdleTimeout ¶
func (r RefreshingTransportParams) HTTP2ReadIdleTimeout() refreshable.Duration
func (RefreshingTransportParams) IdleConnTimeout ¶
func (r RefreshingTransportParams) IdleConnTimeout() refreshable.Duration
func (RefreshingTransportParams) MapTransportParams ¶
func (r RefreshingTransportParams) MapTransportParams(mapFn func(TransportParams) interface{}) refreshable.Refreshable
func (RefreshingTransportParams) MaxIdleConns ¶
func (r RefreshingTransportParams) MaxIdleConns() refreshable.Int
func (RefreshingTransportParams) MaxIdleConnsPerHost ¶
func (r RefreshingTransportParams) MaxIdleConnsPerHost() refreshable.Int
func (RefreshingTransportParams) ProxyFromEnvironment ¶
func (r RefreshingTransportParams) ProxyFromEnvironment() refreshable.Bool
func (RefreshingTransportParams) ResponseHeaderTimeout ¶
func (r RefreshingTransportParams) ResponseHeaderTimeout() refreshable.Duration
func (RefreshingTransportParams) SubscribeToTransportParams ¶
func (r RefreshingTransportParams) SubscribeToTransportParams(consumer func(TransportParams)) (unsubscribe func())
func (RefreshingTransportParams) TLS ¶ added in v2.82.0
func (r RefreshingTransportParams) TLS() RefreshableTLSParams
func (RefreshingTransportParams) TLSHandshakeTimeout ¶
func (r RefreshingTransportParams) TLSHandshakeTimeout() refreshable.Duration
type RefreshingValidatedClientParams ¶
type RefreshingValidatedClientParams struct {
refreshable.Refreshable
}
func NewRefreshingValidatedClientParams ¶
func NewRefreshingValidatedClientParams(in refreshable.Refreshable) RefreshingValidatedClientParams
func (RefreshingValidatedClientParams) APIToken ¶
func (r RefreshingValidatedClientParams) APIToken() refreshable.StringPtr
func (RefreshingValidatedClientParams) BasicAuth ¶ added in v2.49.0
func (r RefreshingValidatedClientParams) BasicAuth() RefreshableBasicAuthPtr
func (RefreshingValidatedClientParams) CurrentValidatedClientParams ¶
func (r RefreshingValidatedClientParams) CurrentValidatedClientParams() ValidatedClientParams
func (RefreshingValidatedClientParams) Dialer ¶
func (r RefreshingValidatedClientParams) Dialer() RefreshableDialerParams
func (RefreshingValidatedClientParams) DisableMetrics ¶
func (r RefreshingValidatedClientParams) DisableMetrics() refreshable.Bool
func (RefreshingValidatedClientParams) MapValidatedClientParams ¶
func (r RefreshingValidatedClientParams) MapValidatedClientParams(mapFn func(ValidatedClientParams) interface{}) refreshable.Refreshable
func (RefreshingValidatedClientParams) MaxAttempts ¶
func (r RefreshingValidatedClientParams) MaxAttempts() refreshable.IntPtr
func (RefreshingValidatedClientParams) MetricsTags ¶
func (r RefreshingValidatedClientParams) MetricsTags() RefreshableTags
func (RefreshingValidatedClientParams) Retry ¶
func (r RefreshingValidatedClientParams) Retry() RefreshableRetryParams
func (RefreshingValidatedClientParams) ServiceName ¶ added in v2.82.0
func (r RefreshingValidatedClientParams) ServiceName() refreshable.String
func (RefreshingValidatedClientParams) SubscribeToValidatedClientParams ¶
func (r RefreshingValidatedClientParams) SubscribeToValidatedClientParams(consumer func(ValidatedClientParams)) (unsubscribe func())
func (RefreshingValidatedClientParams) Timeout ¶
func (r RefreshingValidatedClientParams) Timeout() refreshable.Duration
func (RefreshingValidatedClientParams) Transport ¶
func (r RefreshingValidatedClientParams) Transport() RefreshableTransportParams
func (RefreshingValidatedClientParams) URIs ¶
func (r RefreshingValidatedClientParams) URIs() refreshable.StringSlice
type RetryParams ¶
type StaticTLSConfigProvider ¶ added in v2.82.0
StaticTLSConfigProvider is a TLSProvider that always returns the same *tls.Config.
func NewStaticTLSConfigProvider ¶ added in v2.82.0
func NewStaticTLSConfigProvider(tlsConfig *tls.Config) *StaticTLSConfigProvider
func (*StaticTLSConfigProvider) GetTLSConfig ¶ added in v2.82.0
func (p *StaticTLSConfigProvider) GetTLSConfig(context.Context) *tls.Config
type TLSParams ¶ added in v2.82.0
TLSParams contains the parameters needed to build a *tls.Config. Its fields must all be compatible with reflect.DeepEqual.
type TLSProvider ¶ added in v2.82.0
func NewRefreshableTLSConfig ¶ added in v2.82.0
func NewRefreshableTLSConfig(ctx context.Context, params RefreshableTLSParams) (TLSProvider, error)
NewRefreshableTLSConfig evaluates the provided TLSParams and returns a RefreshableTLSConfig that will update the underlying *tls.Config when the TLSParams change. IF the initial TLSParams are invalid, NewRefreshableTLSConfig will return an error. If the updated TLSParams are invalid, the RefreshableTLSConfig will continue to use the previous value and log the error.
N.B. This subscription only fires when the paths are updated, not when the contents of the files are updated. We could consider adding a file refreshable to watch the key and cert files.
type TransportParams ¶
type TransportParams struct { MaxIdleConns int MaxIdleConnsPerHost int DisableHTTP2 bool DisableKeepAlives bool IdleConnTimeout time.Duration ExpectContinueTimeout time.Duration ResponseHeaderTimeout time.Duration TLSHandshakeTimeout time.Duration HTTPProxyURL *url.URL `refreshables:",exclude"` ProxyFromEnvironment bool HTTP2ReadIdleTimeout time.Duration HTTP2PingTimeout time.Duration TLS TLSParams }
type ValidatedClientParams ¶
type ValidatedClientParams struct { APIToken *string BasicAuth *BasicAuth Dialer DialerParams DisableMetrics bool MaxAttempts *int MetricsTags metrics.Tags Retry RetryParams ServiceName string Timeout time.Duration Transport TransportParams URIs []string }
ValidatedClientParams represents a set of fields derived from a snapshot of ClientConfig. It is designed for use within a refreshable: fields are comparable with reflect.DeepEqual so unnecessary updates are not pushed to subscribers. Values are generally known to be "valid" to minimize downstream error handling.