Documentation
¶
Index ¶
- Constants
- func ConstantBackoff(min, _ time.Duration, _ int, _ *http.Response) time.Duration
- type ClusterFilterParameters
- type CollectionParameters
- type DensifyParameters
- type ForwarderParameters
- type Parameters
- type PrometheusParameters
- type ProxyParameters
- type RetryConfig
- type UrlConfig
- type ValueOrPath
Constants ¶
View Source
const ( DefaultPolicy = "default" ExponentialPolicy = "exponential" JitterPolicy = "jitter" ConstantPolicy = "const" )
policies
View Source
const ( Http = "http" Https = Http + "s" NoPort uint64 = 99999 // 0 is a valid (system) port, so need something > maxPort )
View Source
const ( Empty = "" Comma = "," Dot = "." )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ClusterFilterParameters ¶
type CollectionParameters ¶
type CollectionParameters struct {
Include map[string]bool `yaml:"include,omitempty"`
Interval string `yaml:"interval"`
IntervalSize uint64 `yaml:"interval_size"`
History uint64 `yaml:"history"`
HistoryInt int `yaml:"-"`
Offset uint64 `yaml:"offset"`
OffsetInt int `yaml:"-"`
SampleRate uint64 `yaml:"sample_rate"`
SampleRateSt string `yaml:"-"`
NodeGroupList string `yaml:"node_group_list"`
}
type DensifyParameters ¶
type DensifyParameters struct {
UrlConfig *UrlConfig `yaml:"url"`
Endpoint string `yaml:"endpoint"`
RetryConfig *RetryConfig `yaml:"retry,omitempty"`
}
type ForwarderParameters ¶
type ForwarderParameters struct {
Densify *DensifyParameters `yaml:"densify"`
Proxy *ProxyParameters `yaml:"proxy,omitempty"`
Prefix string `yaml:"prefix,omitempty"`
}
type Parameters ¶
type Parameters struct {
Forwarder *ForwarderParameters `yaml:"forwarder"`
Prometheus *PrometheusParameters `yaml:"prometheus"`
Collection *CollectionParameters `yaml:"collection"`
Clusters []*ClusterFilterParameters `yaml:"clusters"`
Debug bool `yaml:"debug"`
}
func ReadConfig ¶
func ReadConfig() (p *Parameters, err error)
type PrometheusParameters ¶
type PrometheusParameters struct {
UrlConfig *UrlConfig `yaml:"url"`
BearerToken string `yaml:"bearer_token,omitempty"`
CaCertPath string `yaml:"ca_cert,omitempty"`
SigV4Config *sigv4.SigV4Config `yaml:"sigv4,omitempty"`
RetryConfig *RetryConfig `yaml:"retry,omitempty"`
}
type ProxyParameters ¶
type RetryConfig ¶ added in v0.0.4
type RetryConfig struct {
WaitMin time.Duration `yaml:"wait_min"`
WaitMax time.Duration `yaml:"wait_max"`
MaxAttempts int `yaml:"max_attempts"`
Policy string `yaml:"policy,omitempty"`
// contains filtered or unexported fields
}
func (*RetryConfig) NewClient ¶ added in v0.0.4
func (rc *RetryConfig) NewClient(rt http.RoundTripper, logger interface{}) (*http.Client, error)
NewClient should be called only after Validate has been called, to make sure that rc is a valid RetryConfig
func (*RetryConfig) Validate ¶ added in v0.0.4
func (rc *RetryConfig) Validate() (err error)
Validate must be called once, after rc has been constructed / unmarshalled
type ValueOrPath ¶
type ValueOrPath struct {
// contains filtered or unexported fields
}
func NewValueOrPath ¶
func NewValueOrPath(s string, fileOnly, shouldRead bool) (vop *ValueOrPath, e error)
func (*ValueOrPath) IsEmpty ¶
func (vop *ValueOrPath) IsEmpty() bool
func (*ValueOrPath) IsFile ¶
func (vop *ValueOrPath) IsFile() bool
func (*ValueOrPath) Path ¶
func (vop *ValueOrPath) Path() string
func (*ValueOrPath) Value ¶
func (vop *ValueOrPath) Value() string
Click to show internal directories.
Click to hide internal directories.