Documentation
¶
Index ¶
Constants ¶
View Source
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 ¶
View Source
var (
// Metrics provides access to all dial metrics.
Metrics = newDialMetrics()
)
Functions ¶
This section is empty.
Types ¶
type DialMetrics ¶
type DialMetrics struct {
// contains filtered or unexported fields
}
DialMetrics instruments dials to proxy server with prometheus metrics.
func (*DialMetrics) ObserveDialFailure ¶
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 ¶
func (m *DialMetrics) ObserveDialLatency(elapsed time.Duration, protocol, transport string)
ObserveDialLatency records the latency of a dial, labeled by protocol, transport.
Click to show internal directories.
Click to hide internal directories.