From efd575b3250b851cdd07f0d335bbf8e315de5443 Mon Sep 17 00:00:00 2001 From: jackdaw Date: Mon, 28 Nov 2016 14:25:11 +0900 Subject: [PATCH] . --- events/event.go | 6 +++++- events/event_port.go | 16 ++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/events/event.go b/events/event.go index 210157f..590364a 100644 --- a/events/event.go +++ b/events/event.go @@ -7,7 +7,11 @@ const ( const ( COLLECTOR_INSTALL = "http://localhost:8080/_api/collector/event/status/install" - SERVICE_END = "http://localhost:8080/_api/collector/event/service/status/end" + + PORT_START = "http://localhost:8080/_api/collector/event/port/status/start" + PORT_FOUND = "http://localhost:8080/_api/collector/event/port/status/found" + PORT_END = "http://localhost:8080/_api/collector/event/port/status/end" + SERVICE_END = "http://localhost:8080/_api/collector/event/service/status/end" ) type URLMaker interface { diff --git a/events/event_port.go b/events/event_port.go index b3adf69..088a270 100644 --- a/events/event_port.go +++ b/events/event_port.go @@ -1 +1,17 @@ package events + +type PortStartEvent struct { + Zone int64 + PortCount int +} + +func (i PortStartEvent) GetUrl() string { + return SERVICE_END +} + +func NewPortStartEvent(zone int64, portCount uint16) *CollectorInstallEvent { + return &PortStartEvent{ + Zone: zone, + PortCount: portCount, + } +}