prometheus

package
v1.7.5 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2024 License: MIT Imports: 5 Imported by: 4

Documentation

Index

Constants

View Source
const (
	RequestCounter             = "souin_request_upstream_counter"
	RequestRevalidationCounter = "souin_request_revalidation_counter"
	NoCachedResponseCounter    = "souin_no_cached_response_counter"
	CachedResponseCounter      = "souin_cached_response_counter"
	AvgResponseTime            = "souin_avg_response_time"
)

Variables

This section is empty.

Functions

func Add

func Add(name string, value float64)

Increment will add the referred value the counter.

func Increment

func Increment(name string)

Increment will increment the counter.

Types

type PrometheusAPI

type PrometheusAPI struct {
	// contains filtered or unexported fields
}

PrometheusAPI object contains informations related to the endpoints

func InitializePrometheus

func InitializePrometheus(configuration configurationtypes.AbstractConfigurationInterface) *PrometheusAPI

InitializePrometheus initialize the prometheus endpoints

func (*PrometheusAPI) GetBasePath

func (p *PrometheusAPI) GetBasePath() string

GetBasePath will return the basepath for this resource

func (*PrometheusAPI) HandleRequest

func (p *PrometheusAPI) HandleRequest(w http.ResponseWriter, r *http.Request)

HandleRequest will handle the request

func (*PrometheusAPI) IsEnabled

func (p *PrometheusAPI) IsEnabled() bool

IsEnabled will return enabled status

Jump to

Keyboard shortcuts

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