nightingale1/rpc/push.go

23 lines
529 B
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package rpc
import (
"github.com/didi/nightingale/v5/judge"
"github.com/didi/nightingale/v5/trans"
"github.com/didi/nightingale/v5/vos"
)
// 通过普通rpc的方式(msgpack)上报数据
func (*Server) PushToTrans(points []*vos.MetricPoint, reply *string) error {
err := trans.Push(points)
if err != nil {
*reply = err.Error()
}
return nil
}
// server内部做数据重排推送数据给告警引擎
func (*Server) PushToJudge(points []*vos.MetricPoint, reply *string) error {
go judge.Send(points)
return nil
}