mirror of
https://github.com/ScuroNeko/mtg.git
synced 2026-08-31 12:54:01 +03:00
Add prometheus
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
package stats
|
||||
|
||||
import (
|
||||
"net"
|
||||
"time"
|
||||
)
|
||||
|
||||
type streamInfo struct {
|
||||
createdAt time.Time
|
||||
clientIP net.IP
|
||||
}
|
||||
|
||||
func (s *streamInfo) IPType() string {
|
||||
if s.clientIP.To4() == nil {
|
||||
return TagIPTypeIPv6
|
||||
}
|
||||
|
||||
return TagIPTypeIPv4
|
||||
}
|
||||
Reference in New Issue
Block a user