Documentation ¶
Index ¶
- Variables
- type ClientMetrics
- type ConnectionMetrics
- type ConnectionStates
- type ConnectorEnabledClientMetrics
- type Management
- func (this *Management) CollectClientStarted(connector server.ConnectorId) func()
- func (this *Management) CollectContext(ctx *lctx.Context)
- func (this *Management) CollectUpstreamStarted() func()
- func (this *Management) Init(stop support.Channel) error
- func (this *Management) ServeHTTP(resp http.ResponseWriter, req *http.Request)
- type Metrics
- type RequestMetrics
- type RequestStates
- type RulesMetrics
- type UpstreamMetrics
Constants ¶
This section is empty.
Variables ¶
View Source
var (
MetricsLabelNames = []string{
"client_status",
"client_status_summary",
"upstream_status",
"upstream_status_summary",
"rule",
}
)
Functions ¶
This section is empty.
Types ¶
type ClientMetrics ¶ added in v0.1.18
type ClientMetrics struct { Request *RequestMetrics Connections *ConnectionMetrics }
func NewClientMetrics ¶ added in v0.1.18
func NewClientMetrics(id server.ConnectorId, registerer prometheus.Registerer) *ClientMetrics
type ConnectionMetrics ¶ added in v0.1.19
type ConnectionMetrics struct { New prometheus.GaugeFunc Active prometheus.GaugeFunc Idle prometheus.GaugeFunc Current prometheus.GaugeFunc Total prometheus.GaugeFunc Source *ConnectionStates }
func NewConnectionMetrics ¶ added in v0.1.19
func NewConnectionMetrics(registerer prometheus.Registerer, variant string) *ConnectionMetrics
type ConnectionStates ¶ added in v0.1.19
type ConnectorEnabledClientMetrics ¶ added in v0.2.0
type ConnectorEnabledClientMetrics map[server.ConnectorId]*ClientMetrics
func NewConnectorEnabledClientMetrics ¶ added in v0.2.0
func NewConnectorEnabledClientMetrics(connectorIds []server.ConnectorId, registerer prometheus.Registerer) ConnectorEnabledClientMetrics
type Management ¶
type Management struct { Metrics *Metrics Logger log.Logger // contains filtered or unexported fields }
func New ¶
func New(s *settings.Settings, connectorIds []server.ConnectorId, rulesRepository rules.Repository, logger log.Logger) (*Management, error)
func (*Management) CollectClientStarted ¶ added in v0.1.19
func (this *Management) CollectClientStarted(connector server.ConnectorId) func()
func (*Management) CollectContext ¶ added in v0.1.19
func (this *Management) CollectContext(ctx *lctx.Context)
func (*Management) CollectUpstreamStarted ¶ added in v0.1.19
func (this *Management) CollectUpstreamStarted() func()
func (*Management) ServeHTTP ¶
func (this *Management) ServeHTTP(resp http.ResponseWriter, req *http.Request)
type Metrics ¶ added in v0.1.18
type Metrics struct { Client ConnectorEnabledClientMetrics Upstream *UpstreamMetrics Rules *RulesMetrics Registry *prometheus.Registry Handler http.Handler }
func NewMetrics ¶ added in v0.1.18
func NewMetrics(connectorIds []server.ConnectorId, rulesRepository rules.Repository) *Metrics
func (*Metrics) CollectClientStarted ¶ added in v0.1.19
func (this *Metrics) CollectClientStarted(connector server.ConnectorId) func()
func (*Metrics) CollectContext ¶ added in v0.1.19
func (*Metrics) CollectUpstreamStarted ¶ added in v0.1.19
func (this *Metrics) CollectUpstreamStarted() func()
type RequestMetrics ¶ added in v0.1.18
type RequestMetrics struct { DurationSeconds *prometheus.HistogramVec Total *prometheus.CounterVec Current prometheus.GaugeFunc Source *RequestStates }
func NewRequestMetrics ¶ added in v0.1.18
func NewRequestMetrics(registerer prometheus.Registerer, variant string, buckets []float64) *RequestMetrics
type RequestStates ¶ added in v0.1.19
type RequestStates struct {
Current uint64
}
type RulesMetrics ¶ added in v0.1.18
type RulesMetrics struct { Total prometheus.GaugeFunc Sources prometheus.GaugeFunc // contains filtered or unexported fields }
func NewRulesMetrics ¶ added in v0.1.18
func NewRulesMetrics(registerer prometheus.Registerer, rulesRepository rules.Repository) *RulesMetrics
type UpstreamMetrics ¶ added in v0.1.18
type UpstreamMetrics struct {
Request *RequestMetrics
}
func NewUpstreamMetrics ¶ added in v0.1.18
func NewUpstreamMetrics(registerer prometheus.Registerer) *UpstreamMetrics
Click to show internal directories.
Click to hide internal directories.