metrics

package
v0.0.14 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

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

Functions

This section is empty.

Types

type AgentMetrics

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

AgentMetrics includes all the metrics of the proxy agent.

func (*AgentMetrics) ObserveDialLatency

func (a *AgentMetrics) ObserveDialLatency(elapsed time.Duration)

ObserveDialLatency records the latency of dial to the remote endpoint.

func (*AgentMetrics) ObserveFailure

func (a *AgentMetrics) ObserveFailure(direction Direction)

ObserveFailure records a failure to send to or receive from the proxy server, labeled by the direction.

func (*AgentMetrics) Reset

func (a *AgentMetrics) Reset()

Reset resets the metrics.

type Direction

type Direction string
const (

	// DirectionToServer indicates that the agent attempts to send a packet
	// to the proxy server.
	DirectionToServer Direction = "to_server"
	// DirectionFromServer indicates that the agent attempts to receive a
	// packet from the proxy server.
	DirectionFromServer Direction = "from_server"
)

Jump to

Keyboard shortcuts

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