This commit is contained in:
insanity@loafle.com 2017-05-16 17:05:37 +09:00
parent 3885d429cf
commit 9d1ebadbba
12 changed files with 19 additions and 69 deletions

View File

@ -1,6 +0,0 @@
package messages
const (
AGT_START = "AGENTT_START"
AGT_STOP = "AGENT_STOP"
)

View File

@ -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"
)

View File

@ -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"
)

View File

@ -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"

View File

@ -1,6 +0,0 @@
package messages
const (
CRAWLER_ADD = "CRAWLER_ADD"
CRAWLER_REMOVE = "CRAWLER_REMOVE"
)

View File

@ -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"
)

9
messages/data.go Normal file
View File

@ -0,0 +1,9 @@
package messages
type Data struct {
AgentId string
SensorId string
Data []byte
StartedAt uint64
FinishedAt uint64
}

View File

@ -1,5 +0,0 @@
package messages
const (
DATA_SEND = "DATA_SEND"
)

7
messages/event.go Normal file
View File

@ -0,0 +1,7 @@
package messages
type Event struct {
Type string
Id string
Data []byte
}

View File

@ -1,5 +0,0 @@
package messages
const (
EVENT_ERROR = "EVENT_ERROR"
)

View File

@ -1,6 +0,0 @@
package messages
const (
QUEUE_DATA = "QUEUE_DATA"
QUEUE_EVENT = "QUEUE_EVENT"
)

View File

@ -4,9 +4,3 @@ type AgentTask struct {
Command string
Params map[string]string
}
type TaskResult struct {
Command string
Success bool
Err error
}