Something went wrong. Try again.
Cloudflare Tunnel client with NetBSD support
Something went wrong. Try again.
821 B · 40 lines
Go
at master
1234567891011121314151617181920212223242526272829303132333435363738394041package datagramsession
import ( "github.com/prometheus/client_golang/prometheus")
const ( namespace = "cloudflared")
var ( activeUDPSessions = prometheus.NewGauge(prometheus.GaugeOpts{ Namespace: namespace, Subsystem: "udp", Name: "active_sessions", Help: "Concurrent count of UDP sessions that are being proxied to any origin", }) totalUDPSessions = prometheus.NewCounter(prometheus.CounterOpts{ Namespace: namespace, Subsystem: "udp", Name: "total_sessions", Help: "Total count of UDP sessions that have been proxied to any origin", }))
func init() { prometheus.MustRegister( activeUDPSessions, totalUDPSessions, )}
func incrementUDPSessions() { totalUDPSessions.Inc() activeUDPSessions.Inc()}
func decrementUDPActiveSessions() { activeUDPSessions.Dec()}