Documentation
¶
Index ¶
- Variables
- func ChangeEventIP(events <-chan PropertyChangeEvent)
- func CleanUp()
- func DelFeatureSet(ip string)
- func DelMemory(ip string)
- func EnsureIndexOnce()
- func FlushToMongo()
- func GetAnalyze(ip string) bool
- func GetFeatureSet(ip string) *types.FeatureSet
- func GetHashForRedis(ip string) map[string]string
- func GetSuspectedCache() *bigcache.BigCache
- func Increment(f types.Feature)
- func PutAnalyze(ip string)
- func Setup()
- func StartFlushScheduler(interval time.Duration)
- func Store(i interface{})
- func TriggerSuspected(ip string, ft types.FeatureType, count int)
- type Hash
- type InfoJson
- type PropertyChangeEvent
- type Tables
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func DelFeatureSet ¶
func DelFeatureSet(ip string)
func GetAnalyze ¶
func GetFeatureSet ¶
func GetFeatureSet(ip string) *types.FeatureSet
GetFeatureSet 获取或创建IP对应的FeatureSet
func GetHashForRedis ¶
GetHashForRedis 从redis获取hash
func GetSuspectedCache ¶
func PutAnalyze ¶
func PutAnalyze(ip string)
func StartFlushScheduler ¶
StartFlushScheduler 刷新时间窗口,记录到mongodb
func TriggerSuspected ¶
func TriggerSuspected(ip string, ft types.FeatureType, count int)
Types ¶
type InfoJson ¶
type InfoJson struct {
IP string `json:"ip" redis:"ip"`
Username string `json:"username,omitempty" redis:"username,omitempty"`
Mac string `json:"mac,omitempty" redis:"mac,omitempty"`
TTL string `json:"ttl,omitempty" redis:"ttl,omitempty"`
UA string `json:"user_agent,omitempty" redis:"user_agent,omitempty"`
Device string `json:"device,omitempty" redis:"device,omitempty"`
DeviceName string `json:"device_name" redis:"device_name,omitempty"`
DeviceType string `json:"device_type" redis:"device_type,omitempty"`
All string `json:"all,omitempty" redis:"all,omitempty"`
Mobile string `json:"mobile,omitempty" redis:"mobile,omitempty"`
Pc string `json:"pc,omitempty" redis:"pc,omitempty"`
LastSeen float64 `json:"last_seen" redis:"last_seen"`
}
type PropertyChangeEvent ¶
PropertyChangeEvent 属性变化事件结构
Click to show internal directories.
Click to hide internal directories.