Documentation ¶
Index ¶
- type Prometheus
- func (p *Prometheus) Cli(ctx context.Context, resourceID string) (*http.Client, error)
- func (p *Prometheus) Director(r *http.Request)
- func (p *Prometheus) GetPrometheusHostAndScheme() (string, string)
- func (p *Prometheus) ModifyResponse(r *http.Response) error
- func (p *Prometheus) RoundTripper(r *http.Request) (*http.Response, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Prometheus ¶
type Prometheus struct { ReverseProxy *httputil.ReverseProxy // contains filtered or unexported fields }
func New ¶
func New(baseLog *logrus.Entry, dbOpenShiftClusters database.OpenShiftClusters, dialer proxy.Dialer, ) *Prometheus
func (*Prometheus) Director ¶
func (p *Prometheus) Director(r *http.Request)
Director modifies the request to point to the clusters prometheus instance
func (*Prometheus) GetPrometheusHostAndScheme ¶
func (p *Prometheus) GetPrometheusHostAndScheme() (string, string)
func (*Prometheus) ModifyResponse ¶
func (p *Prometheus) ModifyResponse(r *http.Response) error
ModifyResponse: unfortunately Prometheus serves HTML files containing just a couple of absolute links. Given that we're serving Prometheus under /subscriptions/.../clusterName/prometheus, we need to dig these out and rewrite them. This is a hack which hopefully goes away once we forward all metrics to Kusto.
func (*Prometheus) RoundTripper ¶
Click to show internal directories.
Click to hide internal directories.