netmaker/nm-proxy/metrics/metrics.go
2022-11-29 00:25:42 +05:30

21 lines
330 B
Go

package metrics
import (
"sync"
)
/*
1. Create metrics packet--> packet with identifier to track latency, errors.
*/
type Metric struct {
LastRecordedLatency int64
ConnectionStatus bool
TrafficSent uint64
TrafficRecieved uint64
}
var MetricsMapLock *sync.RWMutex
var MetricsMap = make(map[string]Metric)