This commit is contained in:
geek 2018-07-09 20:09:08 +09:00
parent fa39093d51
commit d7d671229c
2 changed files with 14 additions and 23 deletions

17
Gopkg.lock generated
View File

@ -120,8 +120,8 @@
"gzip",
"zlib"
]
revision = "5fb1f31b0a61e9858f12f39266e059848a5f1cea"
version = "v1.3.0"
revision = "b939724e787a27c0005cabe3f78e7ed7987ac74f"
version = "v1.4.0"
[[projects]]
name = "github.com/klauspost/cpuid"
@ -133,20 +133,11 @@
branch = "master"
name = "github.com/shirou/gopsutil"
packages = [
"cpu",
"host",
"internal/common",
"mem",
"net",
"process"
]
revision = "1c49dd8c6f1ec1a36ff6e98cc6ddda727a800219"
[[projects]]
branch = "master"
name = "github.com/shirou/w32"
packages = ["."]
revision = "bb4de0191aa41b5507caa14b0650cdbddcd9280b"
revision = "63728fcf6b24475ecfea044e22242447666c2f52"
[[projects]]
name = "github.com/valyala/fasthttp"
@ -189,7 +180,7 @@
"unix",
"windows"
]
revision = "151529c776cdc58ddbe7963ba9af779f3577b419"
revision = "1b2967e3c290b7c545b3db0deeda16e9be4f98a2"
[[projects]]
name = "gopkg.in/yaml.v2"

View File

@ -49,14 +49,14 @@ func (s *MetricService) StartService() error {
return fmt.Errorf("MetricService: StartService failed %v", err)
}
//s.connector = connector
//
//readChan, writeChan, err := s.connector.Connect()
//if nil != err {
// return fmt.Errorf("MetricService: StartService failed %v", err)
//}
//s.readChan = readChan
//s.writeChan = writeChan
s.connector = connector
readChan, writeChan, err := s.connector.Connect()
if nil != err {
return fmt.Errorf("MetricService: StartService failed %v", err)
}
s.readChan = readChan
s.writeChan = writeChan
return nil
}
@ -76,8 +76,8 @@ func (s *MetricService) Send(metric *ocmd.Metric) error {
if nil != err {
return err
}
// s.MetricService.Send("MS", sensorConfigID, metric)
// logging.Logger().Debugf("Metric: %v", metric)
//s.MetricService.Send("MS", metric.SensorID, metric)
logging.Logger().Debugf("Metric: %v", metric)
s.writeChan <- css.MakeSocketMessage(css.TextMessage, buff)
return nil