Documentation ¶
Index ¶
Constants ¶
View Source
const ( MONITOR_IP_FREQUENT = 0x0 MONITOR_REQUEST = 0x1 MONITOR_TRAINING = 0x2 MONITOR_RANK = 0x3 MONITOR_MEMCACHE = 0x4 MONITOR_DOCKER_FREQUENT = 0x5 MONITOR_GAMING = 0x6 MONITOR_TRAIN_USER_TAG = 0x6 MONITOR_TRADE_CHARGE = 0x7 MONITOR_TMPFILE = 0x8 MONITOR_VM = 0x9 MONITOR_AWD_STATUS_REFRESHER = 0xA MONITOR_USER_LIVING = 0xB // use to monitor how many users are living MONITOR_SCHEDULE_INTERVAL = 30 )
Variables ¶
This section is empty.
Functions ¶
func AppendMonitor ¶
func AppendMonitor(monitor *Monitor)
func StopMonitor ¶
func StopMonitor(code int)
func TryFrequentIp ¶
Types ¶
type FrequentIpListener ¶
type FrequentIpListener struct { Map map[int]*FrequentIpListenerChunk //ip监控池 MaxTimes int LaunchTimes int //监控器被调度次数 ClearInterval int //多少次调度后清除数据 }
func (*FrequentIpListener) CheckAvaliable ¶
func (f *FrequentIpListener) CheckAvaliable(ip int) bool
func (*FrequentIpListener) Clear ¶
func (f *FrequentIpListener) Clear()
func (*FrequentIpListener) Increase ¶
func (f *FrequentIpListener) Increase(ip int)
type FrequentIpListenerChunk ¶
type FrequentIpListenerChunk struct { Counter int Threshold int Detail map[int]*FrequentIpListenerChunkDetail }
ip监控结构
Click to show internal directories.
Click to hide internal directories.