Versions in this module Expand all Collapse all v1 v1.1.0 Jul 10, 2019 Changes in this version + type Banning struct + CheckThreshold int32 + Enabled bool + IPSet string + InvalidPercent float32 + MalformedLimit int32 + Timeout int64 + type Config struct + Banning Banning + Limits Limits + RefreshInterval string + ResetInterval string + Workers int + type Limits struct + Enabled bool + Grace string + Limit int32 + LimitJump int32 + type PolicyServer struct + func Start(cfg *Config, storage *storage.RedisClient) *PolicyServer + func (s *PolicyServer) ApplyLimitPolicy(ip string) bool + func (s *PolicyServer) ApplyLoginPolicy(login, ip string) bool + func (s *PolicyServer) ApplyMalformedPolicy(ip string) bool + func (s *PolicyServer) ApplySharePolicy(ip string, validShare bool) bool + func (s *PolicyServer) BanClient(ip string) + func (s *PolicyServer) Get(ip string) *Stats + func (s *PolicyServer) InBlackList(login string) bool + func (s *PolicyServer) InWhiteList(ip string) bool + func (s *PolicyServer) IsBanned(ip string) bool + func (s *PolicyServer) NewStats() *Stats + type Stats struct + Banned int32 + BannedAt int64 + ConnLimit int32 + InvalidShares int32 + LastBeat int64 + Malformed int32 + ValidShares int32