You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
529 B

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

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
}