mirror of
https://github.com/gravitl/netmaker.git
synced 2024-11-15 06:05:27 +08:00
21 lines
330 B
Go
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)
|