Documentation ¶
Index ¶
- type Metrics
- type Prometheus
- func (p *Prometheus) AddBlockConnection(addr string)
- func (p *Prometheus) AddConnection(addr string)
- func (p *Prometheus) AddDNSProcess(domain string)
- func (p *Prometheus) AddDownload(n int)
- func (p *Prometheus) AddFailedDNS(domain string, rcode dnsmessage.RCode, t dnsmessage.Type)
- func (p *Prometheus) AddReceiveUDPPacket()
- func (p *Prometheus) AddSendUDPPacket()
- func (p *Prometheus) AddStreamConnectDuration(t float64)
- func (p *Prometheus) AddTCPDialFailed(addr string)
- func (p *Prometheus) AddUpload(n int)
- func (p *Prometheus) RemoveConnection(n int)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Metrics ¶
type Metrics interface { AddDownload(n int) AddUpload(n int) AddReceiveUDPPacket() AddSendUDPPacket() AddConnection(addr string) AddBlockConnection(addr string) RemoveConnection(n int) AddStreamConnectDuration(t float64) AddDNSProcess(domain string) AddFailedDNS(domain string, rcode dnsmessage.RCode, t dnsmessage.Type) AddTCPDialFailed(addr string) }
var Counter Metrics = NewPrometheus()
type Prometheus ¶
type Prometheus struct { TotalDownload prometheus.Counter TotalUpload prometheus.Counter TotalReceiveUDPPacket prometheus.Counter TotalSendUDPPacket prometheus.Counter TotalConnection prometheus.Counter CurrentConnection prometheus.Gauge TotalBlockConnection prometheus.Counter StreamConnectDurationSeconds prometheus.Histogram StreamConnectSummarySeconds prometheus.Summary DNSProcessTotal prometheus.Counter FiledDNSTotal prometheus.Counter TCPDialFailedTotal prometheus.Counter }
func NewPrometheus ¶
func NewPrometheus() *Prometheus
func (*Prometheus) AddBlockConnection ¶ added in v0.3.7
func (p *Prometheus) AddBlockConnection(addr string)
func (*Prometheus) AddConnection ¶
func (p *Prometheus) AddConnection(addr string)
func (*Prometheus) AddDNSProcess ¶
func (p *Prometheus) AddDNSProcess(domain string)
func (*Prometheus) AddDownload ¶
func (p *Prometheus) AddDownload(n int)
func (*Prometheus) AddFailedDNS ¶
func (p *Prometheus) AddFailedDNS(domain string, rcode dnsmessage.RCode, t dnsmessage.Type)
func (*Prometheus) AddReceiveUDPPacket ¶
func (p *Prometheus) AddReceiveUDPPacket()
func (*Prometheus) AddSendUDPPacket ¶
func (p *Prometheus) AddSendUDPPacket()
func (*Prometheus) AddStreamConnectDuration ¶
func (p *Prometheus) AddStreamConnectDuration(t float64)
func (*Prometheus) AddTCPDialFailed ¶
func (p *Prometheus) AddTCPDialFailed(addr string)
func (*Prometheus) AddUpload ¶
func (p *Prometheus) AddUpload(n int)
func (*Prometheus) RemoveConnection ¶
func (p *Prometheus) RemoveConnection(n int)
Click to show internal directories.
Click to hide internal directories.