Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

prometheus接收告警信息时,重复代码过多 #44

Closed
minibear2333 opened this issue Jul 31, 2020 · 1 comment
Closed

prometheus接收告警信息时,重复代码过多 #44

minibear2333 opened this issue Jul 31, 2020 · 1 comment

Comments

@minibear2333
Copy link
Contributor

以下两行所定义的router

beego.Router("/prometheus/alert", &controllers.PrometheusController{},"post:PrometheusAlert")

beego.Router("/prometheus/router", &controllers.PrometheusController{},"post:PrometheusRouter")

在此文件内的两个函数有大量重复代码,是否可以合并优化?

func SendMessageP(message Prometheus,logsign string)(string) {

func SendMessageR(message Prometheus,rwxurl,rddurl,rfsurl,rphone,logsign string)(string) {

@feiyu563
Copy link
Owner

feiyu563 commented Aug 2, 2020

已经合并

@feiyu563 feiyu563 closed this as completed Aug 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants