Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNameFieldOverrideAttempted = errors.New("cannot override name field with additional labels") ErrFileProxyScrapeError = errors.New("file proxy file read failed") ErrUnknownExporterType = errors.New("cannot configure unknown exporter type") ErrExporterNameUsedTwice = errors.New("cannot use the same exporter name twice for one endpoint") )
nolint: golint
View Source
var ( // ErrScrapeTimeoutBeforeExecFinished returned when a context times out before the exec exporter receives metrics ErrScrapeTimeoutBeforeExecFinished = errors.New("scrape timed out before exec finished") )
Functions ¶
func NewMetricReverseProxy ¶
func NewMetricReverseProxy(exporter config.ReverseExporter) (http.Handler, error)
NewMetricReverseProxy initializes a new reverse proxy from the given configuration.
Types ¶
type MetricProxy ¶
type MetricProxy interface { // Scrape returns the metrics. Scrape(ctx context.Context, values url.Values) ([]*dto.MetricFamily, error) }
MetricProxy presents an interface which allows a context-cancellable scrape of a backend proxy
type ReverseProxyEndpoint ¶
type ReverseProxyEndpoint struct {
// contains filtered or unexported fields
}
ReverseProxyEndpoint wraps a collection of ReverseProxyBackends. It exposes an HTTP endpoint able to be passed to the user and handles routing and authentication.
func (*ReverseProxyEndpoint) ServeHTTP ¶
func (rpe *ReverseProxyEndpoint) ServeHTTP(wr http.ResponseWriter, req *http.Request)
ServeHTTP implements http.Handler by calling the designated wrapper function.
Click to show internal directories.
Click to hide internal directories.