int
This commit is contained in:
@@ -110,12 +110,12 @@ func (s *ContainerService) Send(containerType occp.ContainerType, method string,
|
||||
}
|
||||
containerSession := _containerSession.(*container.ContainerSession)
|
||||
|
||||
buff, err := s.RPCServerCodec.NewNotification(method, params)
|
||||
messageType, message, err := s.RPCServerCodec.NewNotification(method, params)
|
||||
if nil != err {
|
||||
return err
|
||||
}
|
||||
|
||||
return containerSession.Send(buff)
|
||||
return containerSession.Send(messageType, message)
|
||||
}
|
||||
|
||||
func (s *ContainerService) RunContainer(containerType occp.ContainerType) error {
|
||||
|
||||
@@ -8,7 +8,8 @@ import (
|
||||
cda "git.loafle.net/commons/di-go/annotation"
|
||||
cdr "git.loafle.net/commons/di-go/registry"
|
||||
logging "git.loafle.net/commons/logging-go"
|
||||
csc "git.loafle.net/commons/server-go/client"
|
||||
css "git.loafle.net/commons/server-go/socket"
|
||||
cssc "git.loafle.net/commons/server-go/socket/client"
|
||||
ocmd "git.loafle.net/overflow/commons-go/model/data"
|
||||
ocsp "git.loafle.net/overflow/commons-go/service/probe"
|
||||
"git.loafle.net/overflow/probe/client/data"
|
||||
@@ -28,9 +29,9 @@ type MetricService struct {
|
||||
|
||||
cda.TypeAnnotation `annotation:"@overflow:RPCService()"`
|
||||
|
||||
connector csc.Connector
|
||||
readChan <-chan []byte
|
||||
writeChan chan<- []byte
|
||||
connector cssc.Connector
|
||||
readChan <-chan css.SocketMessage
|
||||
writeChan chan<- css.SocketMessage
|
||||
}
|
||||
|
||||
func (s *MetricService) InitService() error {
|
||||
@@ -77,7 +78,7 @@ func (s *MetricService) Send(metric *ocmd.Metric) error {
|
||||
}
|
||||
// s.MetricService.Send("MS", sensorConfigID, metric)
|
||||
// logging.Logger().Debugf("Metric: %v", metric)
|
||||
s.writeChan <- buff
|
||||
s.writeChan <- css.MakeSocketMessage(css.TextMessage, buff)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user