2016-11-28 05:15:31 +00:00
|
|
|
package events
|
2016-11-28 06:10:50 +00:00
|
|
|
|
2016-11-29 05:34:14 +00:00
|
|
|
import "loafle.com/overflow/collector/discovery/types"
|
|
|
|
|
2016-11-28 06:10:50 +00:00
|
|
|
type HostStartEvent struct {
|
|
|
|
ZoneCount int
|
|
|
|
Zone int64
|
|
|
|
}
|
|
|
|
|
|
|
|
func (i HostStartEvent) GetUrl() string {
|
|
|
|
return HOST_START
|
|
|
|
}
|
|
|
|
|
2016-11-29 05:34:14 +00:00
|
|
|
func NewHostStartEvent(zoneCount int, cidr int64) *HostStartEvent {
|
2016-11-28 06:10:50 +00:00
|
|
|
return &HostStartEvent{ZoneCount: zoneCount, Zone: cidr}
|
|
|
|
}
|
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
type HostFoundEvent struct {
|
|
|
|
Zone int64
|
|
|
|
Host int64
|
|
|
|
}
|
|
|
|
|
|
|
|
func (i HostFoundEvent) GetUrl() string {
|
|
|
|
return HOST_FOUND
|
|
|
|
}
|
|
|
|
|
2016-11-29 05:34:14 +00:00
|
|
|
func NewHostFoundEvent(zone int64, host int64) *HostFoundEvent {
|
2016-11-28 06:10:50 +00:00
|
|
|
return &HostFoundEvent{Zone: zone, Host: host}
|
|
|
|
}
|
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
type HostEndEvent struct {
|
2016-11-29 05:34:14 +00:00
|
|
|
Zone int64
|
|
|
|
HostHistory []*types.HostScanHistory
|
2016-11-28 06:10:50 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (i HostEndEvent) GetUrl() string {
|
|
|
|
return HOST_END
|
|
|
|
}
|
|
|
|
|
2016-11-29 05:34:14 +00:00
|
|
|
func NewHostEndEvent(zone int64, hh []*types.HostScanHistory) *HostEndEvent {
|
|
|
|
return &HostEndEvent{Zone: zone, HostHistory: hh}
|
2016-11-28 06:10:50 +00:00
|
|
|
}
|