prometheus

package
v0.0.0-...-fd6c280 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RequestCounter          = "souin_request_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, api *auth.SecurityAPI) *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