prometheus

package
v0.0.0-...-ed9f9c9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 22, 2024 License: Apache-2.0 Imports: 22 Imported by: 1

Documentation

Index

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) Cli

func (p *Prometheus) Cli(ctx context.Context, resourceID string) (*http.Client, error)

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

func (p *Prometheus) RoundTripper(r *http.Request) (*http.Response, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL