mirror of
https://github.com/ScuroNeko/mtg.git
synced 2026-08-31 13:54:02 +03:00
Add support of EventDomainFronting event
This commit is contained in:
+12
-7
@@ -2,15 +2,20 @@ package stats
|
||||
|
||||
import statsd "github.com/smira/go-statsd"
|
||||
|
||||
type streamInfo map[string]string
|
||||
|
||||
func (s streamInfo) T(key string) statsd.Tag {
|
||||
return statsd.StringTag(key, s[key])
|
||||
type streamInfo struct {
|
||||
isDomainFronted bool
|
||||
tags map[string]string
|
||||
}
|
||||
|
||||
func (s streamInfo) Reset() {
|
||||
for k := range s {
|
||||
delete(s, k)
|
||||
func (s streamInfo) T(key string) statsd.Tag {
|
||||
return statsd.StringTag(key, s.tags[key])
|
||||
}
|
||||
|
||||
func (s *streamInfo) Reset() {
|
||||
s.isDomainFronted = false
|
||||
|
||||
for k := range s.tags {
|
||||
delete(s.tags, k)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user