apiserver: k8s.io/apiserver/pkg/server/egressselector/metrics Index | Files

package metrics

import "k8s.io/apiserver/pkg/server/egressselector/metrics"

Index

Package Files

metrics.go

Constants

const (

    // ProtocolHTTPConnect means that the proxy protocol is http-connect.
    ProtocolHTTPConnect = "http_connect"
    // ProtocolGRPC means that the proxy protocol is the GRPC protocol.
    ProtocolGRPC = "grpc"
    // TransportTCP means that the transport is TCP.
    TransportTCP = "tcp"
    // TransportUDS means that the transport is UDS.
    TransportUDS = "uds"
    // StageConnect indicates that the dial failed at establishing connection to the proxy server.
    StageConnect = "connect"
    // StageProxy indicates that the dial failed at requesting the proxy server to proxy.
    StageProxy = "proxy"
)

Variables

var (

    // Metrics provides access to all dial metrics.
    Metrics = newDialMetrics()
)

type DialMetrics Uses

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

DialMetrics instruments dials to proxy server with prometheus metrics.

func (*DialMetrics) Clock Uses

func (m *DialMetrics) Clock() clock.Clock

Clock returns the clock.

func (*DialMetrics) ObserveDialFailure Uses

func (m *DialMetrics) ObserveDialFailure(protocol, transport, stage string)

ObserveDialFailure records a failed dial, labeled by protocol, transport, and the stage the dial failed at.

func (*DialMetrics) ObserveDialLatency Uses

func (m *DialMetrics) ObserveDialLatency(elapsed time.Duration, protocol, transport string)

ObserveDialLatency records the latency of a dial, labeled by protocol, transport.

func (*DialMetrics) Reset Uses

func (m *DialMetrics) Reset()

Reset resets the metrics.

func (*DialMetrics) SetClock Uses

func (m *DialMetrics) SetClock(c clock.Clock)

SetClock sets the clock.

Package metrics imports 4 packages (graph) and is imported by 1 packages. Updated 2020-03-10. Refresh now. Tools for package owners.