Documentation ¶
Index ¶
Constants ¶
View Source
const ( // ReadHeaderTimeout is the amount of time allowed to read // request headers. // HTTP timeouts are necessary to expire inactive connections // and failing to do so might make the application vulnerable // to attacks like slowloris which work by sending data very slow, // which in case of no timeout will keep the connection active // eventually leading to a denial-of-service (DoS) attack. // References: // - https://en.wikipedia.org/wiki/Slowloris_(computer_security) ReadHeaderTimeout = 32 * time.Second // WriteTimeout is the amount of time allowed to write the // request data. // HTTP timeouts are necessary to expire inactive connections // and failing to do so might make the application vulnerable // to attacks like slowloris which work by sending data very slow, // which in case of no timeout will keep the connection active // eventually leading to a denial-of-service (DoS) attack. WriteTimeout = 5 * time.Minute // ReadTimeout is the amount of time allowed to read // response data. // HTTP timeouts are necessary to expire inactive connections // and failing to do so might make the application vulnerable // to attacks like slowloris which work by sending data very slow, // which in case of no timeout will keep the connection active // eventually leading to a denial-of-service (DoS) attack. ReadTimeout = 5 * time.Minute )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Options ¶
type Options struct { CustomMetricsAdapterServerOptions *options.CustomMetricsAdapterServerOptions // MetricsBindAddress is the TCP address that the server should bind to // for serving prometheus metrics. // It can be set to "0" to disable the metrics serving. // Defaults to ":8080". MetricsBindAddress string KubeConfig string // ClusterAPIQPS is the QPS to use while talking with cluster kube-apiserver. ClusterAPIQPS float32 // ClusterAPIBurst is the burst to allow while talking with cluster kube-apiserver. ClusterAPIBurst int // KubeAPIQPS is the QPS to use while talking with karmada-apiserver. KubeAPIQPS float32 // KubeAPIBurst is the burst to allow while talking with karmada-apiserver. KubeAPIBurst int ProfileOpts profileflag.Options }
Options contains everything necessary to create and run metrics-adapter.
func (*Options) Config ¶
func (o *Options) Config(stopCh <-chan struct{}) (*metricsadapter.MetricsServer, error)
Config returns config for the metrics-adapter server given Options
Click to show internal directories.
Click to hide internal directories.