add a method to get the Endpoint (#540)

Co-authored-by: lynxcat <lynxcatdeng@gmail.com>
This commit is contained in:
lynxcat 2021-01-23 08:50:36 +08:00 committed by GitHub
parent f0a4c130f6
commit aab2f8b090
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 0 deletions

View File

@ -18,6 +18,7 @@ func Config(r *gin.Engine) {
v1.GET("/ping", ping)
v1.GET("/pid", pid)
v1.GET("/addr", addr)
v1.GET("/endpoint", endpoint)
v1.GET("/stra", getStrategy)
v1.GET("/cached", getLogCached)

View File

@ -0,0 +1,10 @@
package http
import (
"github.com/didi/nightingale/src/modules/agent/config"
"github.com/gin-gonic/gin"
)
func endpoint(c *gin.Context) {
c.String(200, config.Endpoint)
}