agent
This commit is contained in:
parent
6e858f180d
commit
8a41b8a835
6
agent.go
6
agent.go
|
@ -98,7 +98,7 @@ func (agt *Agent) startAgent() {
|
||||||
<-colStarted
|
<-colStarted
|
||||||
|
|
||||||
//8.evt result
|
//8.evt result
|
||||||
res := msg.Event{msg.EVT_TYPE_NONE, msg.AGT_START, nil}
|
res := msg.Event{msg.EVT_TYPE_NONE, msg.EVENT_AGT_START, nil}
|
||||||
evt.AddEventData(res)
|
evt.AddEventData(res)
|
||||||
|
|
||||||
go agt.processCollectingData(dataCh)
|
go agt.processCollectingData(dataCh)
|
||||||
|
@ -122,7 +122,7 @@ func (agt *Agent) waitAgentTask() {
|
||||||
d := <-agt.taskCh
|
d := <-agt.taskCh
|
||||||
task := d.(msg.AgentTask)
|
task := d.(msg.AgentTask)
|
||||||
switch task.Command {
|
switch task.Command {
|
||||||
case msg.TASK_POLLER_INTERVAL_UPDATE:
|
case msg.TASK_POL_INTERVAL_UPDATE:
|
||||||
agt.processUpdatePolInterval(task)
|
agt.processUpdatePolInterval(task)
|
||||||
break
|
break
|
||||||
case msg.TASK_SENSOR_START:
|
case msg.TASK_SENSOR_START:
|
||||||
|
@ -190,7 +190,7 @@ func (agt *Agent) stopAgent() {
|
||||||
}
|
}
|
||||||
<-polStopped
|
<-polStopped
|
||||||
|
|
||||||
evt.AddEventData(msg.Event{msg.EVT_TYPE_NONE, msg.AGT_STOP, nil})
|
evt.AddEventData(msg.Event{msg.EVT_TYPE_NONE, msg.EVENT_AGT_STOP, nil})
|
||||||
evt.Stop()
|
evt.Stop()
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user