1 Star 0 Fork 2

yanyue / cloudbases.io.kiali

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
jaeger.go 774 Bytes
一键复制 编辑 原始数据 按行查看 历史
Hubery1003 提交于 2021-12-16 10:12 . first commit
package handlers
import (
"net/http"
"github.com/kiali/kiali/config"
"github.com/kiali/kiali/models"
)
// Get JaegerInfo provides the proxy Jaeger URL
func GetJaegerInfo(w http.ResponseWriter, r *http.Request) {
jaegerConfig := config.Get().ExternalServices.Jaeger
info := models.JaegerInfo{
URL: jaegerConfig.URL,
}
// Check if URL is in the configuration
if info.URL == "" {
RespondWithError(w, http.StatusNotFound, "You need to set the Jaeger URL configuration.")
return
}
// Check if URL is valid
_, error := validateURL(info.URL)
if error != nil {
RespondWithError(w, http.StatusNotAcceptable, "You need to set a correct format for Jaeger URL in the configuration error: "+error.Error())
return
}
RespondWithJSON(w, http.StatusOK, info)
}
1
https://gitee.com/programmer-zpz/cloudbases.io.kiali.git
git@gitee.com:programmer-zpz/cloudbases.io.kiali.git
programmer-zpz
cloudbases.io.kiali
cloudbases.io.kiali
v0.15.1

搜索帮助