metrics

package
Version: v0.0.0-...-5fcf146 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2018 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MeasureConn

func MeasureConn(conn ssnet.DuplexConn, bytesSent, bytesRceived *int64) ssnet.DuplexConn

func MeasureReader

func MeasureReader(reader io.Reader, count *int64) io.Reader

func MeasureWriter

func MeasureWriter(writer io.Writer, count *int64) io.Writer

func SPrintMetrics

func SPrintMetrics(m ProxyMetrics) string

Types

type MetricsMap

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

func NewMetricsMap

func NewMetricsMap() *MetricsMap

func (*MetricsMap) Add

func (this *MetricsMap) Add(key string, toAdd ProxyMetrics)

func (*MetricsMap) Get

func (this *MetricsMap) Get(key string) ProxyMetrics

type ProxyMetrics

type ProxyMetrics struct {
	ClientProxy int64
	ProxyTarget int64
	TargetProxy int64
	ProxyClient int64
}

type TCPMetrics

type TCPMetrics interface {
	AddTCPConnection()
	RemoveTCPConnection(accessKey, status string, duration time.Duration)
}

func NewPrometheusTCPMetrics

func NewPrometheusTCPMetrics() TCPMetrics

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL