Documentation ¶
Index ¶
- type Config
- type Description
- type GateMetrics
- func (m *GateMetrics) Collect(ch chan<- prometheus.Metric)
- func (m *GateMetrics) Describe(descs chan<- *prometheus.Desc)
- func (m GateMetrics) MarkHealthy(endpoint string)
- func (m GateMetrics) MarkUnhealthy(endpoint string)
- func (m GateMetrics) SetHealth(s HealthStatus)
- func (m GateMetrics) SetVersion(ver string)
- func (g *GateMetrics) Unregister()
- type HealthStatus
- type Service
- type StatisticScraper
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Description ¶ added in v0.28.0
type Description struct { Type dto.MetricType Namespace string Subsystem string Name string Help string ConstantLabels prometheus.Labels VariableLabels []string }
func DescribeAll ¶ added in v0.28.0
func DescribeAll() []Description
DescribeAll returns descriptions for metrics.
func (*Description) BuildFQName ¶ added in v0.28.0
func (d *Description) BuildFQName() string
func (*Description) MarshalJSON ¶ added in v0.28.0
func (d *Description) MarshalJSON() ([]byte, error)
type GateMetrics ¶
type GateMetrics struct {
// contains filtered or unexported fields
}
func NewGateMetrics ¶
func NewGateMetrics(p StatisticScraper) *GateMetrics
NewGateMetrics creates new metrics for http gate.
func (*GateMetrics) Collect ¶
func (m *GateMetrics) Collect(ch chan<- prometheus.Metric)
func (*GateMetrics) Describe ¶
func (m *GateMetrics) Describe(descs chan<- *prometheus.Desc)
func (GateMetrics) MarkHealthy ¶ added in v0.28.0
func (m GateMetrics) MarkHealthy(endpoint string)
func (GateMetrics) MarkUnhealthy ¶ added in v0.28.0
func (m GateMetrics) MarkUnhealthy(endpoint string)
func (GateMetrics) SetHealth ¶
func (m GateMetrics) SetHealth(s HealthStatus)
func (GateMetrics) SetVersion ¶ added in v0.28.0
func (m GateMetrics) SetVersion(ver string)
func (*GateMetrics) Unregister ¶
func (g *GateMetrics) Unregister()
type HealthStatus ¶
type HealthStatus int32
HealthStatus of the gate application.
const ( HealthStatusUndefined HealthStatus = 0 HealthStatusStarting HealthStatus = 1 HealthStatusReady HealthStatus = 2 HealthStatusShuttingDown HealthStatus = 3 )
type Service ¶
Service serves metrics.
func NewPprofService ¶
NewPprofService creates a new service for gathering pprof metrics.
func NewPrometheusService ¶
NewPrometheusService creates a new service for gathering prometheus metrics.
type StatisticScraper ¶ added in v0.28.0
Click to show internal directories.
Click to hide internal directories.