Reset a project

This commit is contained in:
9seconds
2021-03-04 10:15:34 +03:00
parent 7718f62477
commit baee322cd7
95 changed files with 2 additions and 6505 deletions
-30
View File
@@ -1,30 +0,0 @@
package antireplay
import (
"sync"
"github.com/9seconds/mtg/config"
"github.com/VictoriaMetrics/fastcache"
)
type CacheInterface interface {
AddObfuscated2([]byte)
AddTLS([]byte)
HasObfuscated2([]byte) bool
HasTLS([]byte) bool
}
var (
Cache CacheInterface
initOnce sync.Once
)
func Init() {
initOnce.Do(func() {
if config.C.AntiReplayMaxSize == 0 {
Cache = nilCache{}
} else {
Cache = cache{fastcache.New(config.C.AntiReplayMaxSize)}
}
})
}