Versions in this module Expand all Collapse all v0 v0.26.0 Apr 9, 2022 Changes in this version + var ThanosUserAgent = fmt.Sprintf("Thanos/%s", version.Version) + func NewHTTPClient(cfg ClientConfig, name string) (*http.Client, error) + func NewRoundTripperFromConfig(cfg config_util.HTTPClientConfig, transportConfig TransportConfig, name string) (http.RoundTripper, error) + type AddressProvider interface + Addresses func() []string + Resolve func(context.Context, []string) error + type BasicAuth struct + Password string + PasswordFile string + Username string + func (b BasicAuth) IsZero() bool + type Client struct + func NewClient(logger log.Logger, cfg EndpointsConfig, client *http.Client, ...) (*Client, error) + func (c *Client) Discover(ctx context.Context) + func (c *Client) Do(req *http.Request) (*http.Response, error) + func (c *Client) Endpoints() []*url.URL + func (c *Client) Resolve(ctx context.Context) error + type ClientConfig struct + BasicAuth BasicAuth + BearerToken string + BearerTokenFile string + ClientMetrics *extpromhttp.ClientMetrics + ProxyURL string + TLSConfig TLSConfig + TransportConfig TransportConfig + func NewClientConfigFromYAML(cfg []byte) (*ClientConfig, error) + type Config struct + EndpointsConfig EndpointsConfig + HTTPClientConfig ClientConfig + func BuildConfig(addrs []string) ([]Config, error) + func DefaultConfig() Config + func LoadConfigs(confYAML []byte) ([]Config, error) + func (c *Config) UnmarshalYAML(unmarshal func(interface{}) error) error + type EndpointsConfig struct + FileSDConfigs []FileSDConfig + PathPrefix string + Scheme string + StaticAddresses []string + type FileSDConfig struct + Files []string + RefreshInterval model.Duration + type TLSConfig struct + CAFile string + CertFile string + InsecureSkipVerify bool + KeyFile string + ServerName string + type TransportConfig struct + DisableCompression bool + ExpectContinueTimeout int64 + IdleConnTimeout int64 + MaxConnsPerHost int + MaxIdleConns int + MaxIdleConnsPerHost int + ResponseHeaderTimeout int64 + TLSHandshakeTimeout int64