prometheus

package
v1.0.20 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func APIRequestsCounter

func APIRequestsCounter(labels Labels) option

func RequestDuration

func RequestDuration(labels Labels, duration float64) option

func RequestSize

func RequestSize(labels Labels, reqSize float64) option

func ResponseSize

func ResponseSize(labels Labels, respSize float64) option

Types

type Config

type Config struct {
	Host string `yaml:"host"`
	Port int    `yaml:"port"`
	Path string `yaml:"path"`
}

type Labels

type Labels prometheus.Labels

type Monitor

type Monitor struct {
	ServiceName string //监控服务的名称
	// contains filtered or unexported fields
}

func NewMonitor

func NewMonitor(namespace string) *Monitor

func (*Monitor) With

func (m *Monitor) With(opts ...option)

Jump to

Keyboard shortcuts

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