management

package
v0.7.18 Latest Latest
Warning

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

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

Documentation

Index

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 ConnectionStates struct {
	New    uint64
	Active uint64
	Idle   uint64

	Current uint64
	Total   uint64
	Max     uint64
}

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) Init

func (this *Management) Init(stop support.Channel) error

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 (this *Metrics) CollectContext(ctx *context.Context)

func (*Metrics) CollectUpstreamStarted added in v0.1.19

func (this *Metrics) CollectUpstreamStarted() func()

func (*Metrics) ServeHTTP added in v0.1.18

func (this *Metrics) ServeHTTP(resp http.ResponseWriter, req *http.Request)

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

Jump to

Keyboard shortcuts

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