app

package
v1.14.0 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Context

func Context() context.Context

Context is application context

func NewHealthcheckMetric

func NewHealthcheckMetric(withAdditionalLabels prometheus.Labels) prometheus.Collector

NewHealthcheckMetric -

func PProfHandler

func PProfHandler() http.Handler

PProfHandler pprof http handler

func SetContext

func SetContext(c context.Context)

SetContext set app context

func SetHealthState

func SetHealthState(state bool)

SetHealthState -

func SetupMetrics

func SetupMetrics(opts ...SetupMetricsOpt) error

SetupMetrics -

func StandardMetrics

func StandardMetrics() []prometheus.Collector

StandardMetrics добавим гошные + системные коллекторы

func WhenHaveMetricsRegistry

func WhenHaveMetricsRegistry(f func(reg *prometheus.Registry))

WhenHaveMetricsRegistry ...

Types

type AddMetrics

type AddMetrics struct {
	Metrics []prometheus.Collector
}

AddMetrics -

type HcHandler

type HcHandler struct{}

HcHandler -

func (HcHandler) ServeHTTP

func (HcHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP -

type NoStandardMetrics

type NoStandardMetrics struct{}

NoStandardMetrics -

type SetupMetricsOpt

type SetupMetricsOpt interface {
	// contains filtered or unexported methods
}

SetupMetricsOpt -

Jump to

Keyboard shortcuts

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