.
This commit is contained in:
parent
efd575b325
commit
c9ecfcc2c1
|
@ -1,17 +1,57 @@
|
|||
package events
|
||||
|
||||
// Port Event Start
|
||||
type PortStartEvent struct {
|
||||
Zone int64
|
||||
PortCount int
|
||||
PortCount uint16
|
||||
}
|
||||
|
||||
func (i PortStartEvent) GetUrl() string {
|
||||
return SERVICE_END
|
||||
return PORT_START
|
||||
}
|
||||
|
||||
func NewPortStartEvent(zone int64, portCount uint16) *CollectorInstallEvent {
|
||||
func NewPortStartEvent(zone int64, portCount uint16) *PortStartEvent {
|
||||
return &PortStartEvent{
|
||||
Zone: zone,
|
||||
PortCount: portCount,
|
||||
}
|
||||
}
|
||||
|
||||
// Port Event Found
|
||||
type PortFoundEvent struct {
|
||||
Zone int64
|
||||
Host int64
|
||||
Port uint16
|
||||
Type string
|
||||
}
|
||||
|
||||
func (i PortFoundEvent) GetUrl() string {
|
||||
return PORT_FOUND
|
||||
}
|
||||
|
||||
func NewPortFoundEvent(zone int64, host int64, port uint16, t string) *PortFoundEvent {
|
||||
return &PortFoundEvent{
|
||||
Zone: zone,
|
||||
Host: host,
|
||||
Port: port,
|
||||
Type: t,
|
||||
}
|
||||
}
|
||||
|
||||
// Port Event Found
|
||||
type PortEndEvent struct {
|
||||
Zone int64
|
||||
Host int64
|
||||
// history ???
|
||||
}
|
||||
|
||||
func (i PortEndEvent) GetUrl() string {
|
||||
return PORT_START
|
||||
}
|
||||
|
||||
func NewPortEndEvent(zone int64, host int64) *PortEndEvent {
|
||||
return &PortEndEvent{
|
||||
Zone: zone,
|
||||
Host: host,
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,6 +8,6 @@ func (i ServiceEndEvent) GetUrl() string {
|
|||
return SERVICE_END
|
||||
}
|
||||
|
||||
func NewServiceEndEvent(s string) *CollectorInstallEvent {
|
||||
func NewServiceEndEvent(s string) *ServiceEndEvent {
|
||||
return &ServiceEndEvent{ServiceName: s}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user