added
discovery
This commit is contained in:
parent
c1e4ecfd5d
commit
2c9c23c453
|
@ -8,6 +8,9 @@ const (
|
|||
const (
|
||||
COLLECTOR_INSTALL = "/_api/collector/discovery/event/status/install"
|
||||
|
||||
DISCOVERY_START = "/_api/collector/event/discovery/status/start"
|
||||
DISCOVERY_END = "/_api/collector/event/discovery/status/end"
|
||||
|
||||
HOST_START = "/_api/collector/discovery/event/host/status/start"
|
||||
HOST_FOUND = "/_api/collector/discovery/event/host/status/found"
|
||||
HOST_END = "/_api/collector/discovery/event/host/status/end"
|
||||
|
|
|
@ -1,9 +1,6 @@
|
|||
package events
|
||||
|
||||
const (
|
||||
DEAFULT = "http://localhost:8080"
|
||||
DISCOVERY_START = "/_api/collector/event/discovery/status/start"
|
||||
)
|
||||
const ()
|
||||
|
||||
type DiscoveryStartEvent struct {
|
||||
Message string
|
||||
|
@ -11,9 +8,21 @@ type DiscoveryStartEvent struct {
|
|||
}
|
||||
|
||||
func (i DiscoveryStartEvent) GetUrl() string {
|
||||
return DEAFULT + DISCOVERY_START
|
||||
return DISCOVERY_START
|
||||
}
|
||||
|
||||
func NewDiscoveryStartEvent(message string, cidr int64) *DiscoveryStartEvent {
|
||||
return &DiscoveryStartEvent{Message: message, Zone: cidr}
|
||||
}
|
||||
|
||||
type DiscoveryEndEvent struct {
|
||||
Message string
|
||||
}
|
||||
|
||||
func (i DiscoveryEndEvent) GetUrl() string {
|
||||
return DISCOVERY_START
|
||||
}
|
||||
|
||||
func NewDiscoveryEndEvent(message string) *DiscoveryEndEvent {
|
||||
return &DiscoveryEndEvent{Message: message}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user