metrics

package
v0.0.0-...-a423d60 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Namespace             = "compass"
	SystemBrokerSubsystem = "system_broker"
)

Variables

View Source
var PathToInstrumentationMapping map[Path]func(c *Collector, handler http.Handler) http.HandlerFunc

Functions

func MapPathToInstrumentation

func MapPathToInstrumentation(rootAPI string)

Types

type Collector

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

func NewCollector

func NewCollector() *Collector

func (*Collector) BindHandlerWithInstrumentation

func (c *Collector) BindHandlerWithInstrumentation(handler http.Handler) http.HandlerFunc

func (*Collector) CatalogHandlerWithInstrumentation

func (c *Collector) CatalogHandlerWithInstrumentation(handler http.Handler) http.HandlerFunc

func (*Collector) Collect

func (c *Collector) Collect(ch chan<- prometheus.Metric)

func (*Collector) DeprovosionHandlerWithInstrumentation

func (c *Collector) DeprovosionHandlerWithInstrumentation(handler http.Handler) http.HandlerFunc

func (*Collector) Describe

func (c *Collector) Describe(ch chan<- *prometheus.Desc)

func (*Collector) ProvisionHandlerWithInstrumentation

func (c *Collector) ProvisionHandlerWithInstrumentation(handler http.Handler) http.HandlerFunc

func (*Collector) UnbindHandlerWithInstrumentation

func (c *Collector) UnbindHandlerWithInstrumentation(handler http.Handler) http.HandlerFunc

type Config

type Config struct {
	Port            int           `mapstructure:"port"`
	Timeout         time.Duration `mapstructure:"server_timeout"`
	ShutDownTimeout time.Duration `mapstructure:"shut_down_timeout"`
}

func DefaultConfig

func DefaultConfig() *Config

func (*Config) Validate

func (s *Config) Validate() error

type Path

type Path struct {
	PathTemplate string
	HTTPMethods  string
}

Jump to

Keyboard shortcuts

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