Add support of EventDomainFronting event

This commit is contained in:
9seconds
2021-03-29 11:56:05 +03:00
parent 36d695118e
commit bef14bd009
17 changed files with 317 additions and 53 deletions
+12 -7
View File
@@ -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)
}
}