diff --git a/messages/agent.go b/messages/agent.go deleted file mode 100644 index 116b0da..0000000 --- a/messages/agent.go +++ /dev/null @@ -1,6 +0,0 @@ -package messages - -const ( - AGT_START = "AGENTT_START" - AGT_STOP = "AGENT_STOP" -) diff --git a/messages/collector.go b/messages/collector.go deleted file mode 100644 index cf40101..0000000 --- a/messages/collector.go +++ /dev/null @@ -1,10 +0,0 @@ -package messages - -const ( - CLT_READY = "COLLECTOR_READY" - CLT_STOPPED = "COLLECTOR_STOPPED" - CLT_SENSOR_REMOVE_DONE = "COLLECTOR_SENSOR_REMOVE_DONE" - CLT_SENSOR_UPDATE_DONE = "COLLECTOR_SENSOR_UPDATE_DONE" - CLT_CRM_UPDATE_DONE = "COLLECTOR_CRAWLER_UPDATE_DONE" - CLT_DATA_SEND = "DATA_SEND" -) diff --git a/messages/config_manager.go b/messages/config_manager.go deleted file mode 100644 index faea971..0000000 --- a/messages/config_manager.go +++ /dev/null @@ -1,15 +0,0 @@ -package messages - -const ( - //CONFIGMANAGER_LOADED = "CONFIGMANAGER_LOADED" - //ADD_SENSOR_1 = "ADD_SENSOR_1" - //REMOVE_SENSOR_1 = "REMOVE_SENSOR_1" - - CFG_LOADED = "CONFIG_LOADED" - - SCF_READY = "SENSOR_CONFIG_READY" - SCF_STOPPED = "SENSOR_CONFIG_STOPPED" - SCF_SENSOR_ADD_DONE = "SENSOR_CONFIG_SENSOR_ADD_DONE" - - SCF_SENSOR_UPDATE_DONE = "SENSOR_CONFIG_SENSOR_UPDATE_DONE" -) diff --git a/messages/poller.go b/messages/const.go similarity index 90% rename from messages/poller.go rename to messages/const.go index 9942846..789d4c8 100644 --- a/messages/poller.go +++ b/messages/const.go @@ -1,6 +1,9 @@ package messages const ( + AGT_START = "AGENT_START" + AGT_STOP = "AGENT_STOP" + TASK_SENSOR_START = "TASK_SENSOR_START" TASK_SENSOR_STOP = "TASK_SENSOR_STOP" TASK_SENSOR_ADD = "TASK_SENSOR_ADD" diff --git a/messages/crawler.go b/messages/crawler.go deleted file mode 100644 index 46508ed..0000000 --- a/messages/crawler.go +++ /dev/null @@ -1,6 +0,0 @@ -package messages - -const ( - CRAWLER_ADD = "CRAWLER_ADD" - CRAWLER_REMOVE = "CRAWLER_REMOVE" -) diff --git a/messages/crawler_manager.go b/messages/crawler_manager.go deleted file mode 100644 index 907191b..0000000 --- a/messages/crawler_manager.go +++ /dev/null @@ -1,10 +0,0 @@ -package messages - -const ( - CRM_READY = "CRAWLER_READY" - CRM_STOPPED = "CRAWLER_STOPPED" - CRM_SENSOR_ADD_DONE = "CRAWLER_SENSOR_ADD_DONE" - CRM_SENSOR_REMOVE_DONE = "CRAWLER_SENSOR_REMOVE_DONE" - CRM_SENSOR_UPDATE_DONE = "CRAWLER_SENSOR_UPDATE_DONE" - CRM_UPDATE_DONE = "CRAWLER_UPDATE_DONE" -) diff --git a/messages/data.go b/messages/data.go new file mode 100644 index 0000000..b2cf1ff --- /dev/null +++ b/messages/data.go @@ -0,0 +1,9 @@ +package messages + +type Data struct { + AgentId string + SensorId string + Data []byte + StartedAt uint64 + FinishedAt uint64 +} diff --git a/messages/data_sender.go b/messages/data_sender.go deleted file mode 100644 index 9ddc558..0000000 --- a/messages/data_sender.go +++ /dev/null @@ -1,5 +0,0 @@ -package messages - -const ( - DATA_SEND = "DATA_SEND" -) diff --git a/messages/event.go b/messages/event.go new file mode 100644 index 0000000..175838d --- /dev/null +++ b/messages/event.go @@ -0,0 +1,7 @@ +package messages + +type Event struct { + Type string + Id string + Data []byte +} diff --git a/messages/event_sender.go b/messages/event_sender.go deleted file mode 100644 index b8ecd6a..0000000 --- a/messages/event_sender.go +++ /dev/null @@ -1,5 +0,0 @@ -package messages - -const ( - EVENT_ERROR = "EVENT_ERROR" -) diff --git a/messages/queue.go b/messages/queue.go deleted file mode 100644 index df43c0b..0000000 --- a/messages/queue.go +++ /dev/null @@ -1,6 +0,0 @@ -package messages - -const ( - QUEUE_DATA = "QUEUE_DATA" - QUEUE_EVENT = "QUEUE_EVENT" -) diff --git a/messages/task.go b/messages/task.go index 2689f66..daf7773 100644 --- a/messages/task.go +++ b/messages/task.go @@ -4,9 +4,3 @@ type AgentTask struct { Command string Params map[string]string } - -type TaskResult struct { - Command string - Success bool - Err error -}