Documentation ¶
Index ¶
Constants ¶
View Source
const ( Empty = ncommon.Empty Comma = "," Dot = "." )
View Source
const ( Slash = "/" Http = "http" Https = Http + "s" DefaultHttpPort uint64 = 80 DefaultHttpsPort uint64 = 443 IgnorePort uint64 = 99999 // 0 is a valid port, need another invalid value indicating "ignore me" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
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 *rhttp.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 *rhttp.RetryConfig `yaml:"retry,omitempty"` }
type ProxyParameters ¶
type ValueOrPath ¶
ValueOrPath is typically used to read Kubernetes secrets (https://kubernetes.io/docs/concepts/configuration/secret/), which can be provided to pods using either environment variables or mounted volumes. It is an interface to ensure consistency - use NewValueOrPath() function to obtain one
func NewValueOrPath ¶
func NewValueOrPath(s string, fileOnly, shouldRead bool) (vop ValueOrPath, e error)
NewValueOrPath returns a new ValueOrPath according to the arguments:
- s is either the value itself or a path to a file containing the value (the value is then read as a string)
- fileOnly indicates if s must be a path; set it to true for values which should be passed only in files, either for security purposes (k8s secret mounted as a volume), or when the file is needed by whichever library (e.g. a cert file)
- shouldRead indicates whether a file should actually be read, so its value is available through this interface (e.g. for a cert file pass false)
Click to show internal directories.
Click to hide internal directories.