25 lines
436 B
Go
25 lines
436 B
Go
package http
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"github.com/gin-gonic/gin"
|
|
"github.com/lyra/orion-telemetry/internal/version"
|
|
)
|
|
|
|
func Health(c *gin.Context) {
|
|
c.JSON(http.StatusOK, gin.H{
|
|
"service": version.Service,
|
|
"status": "healthy",
|
|
})
|
|
}
|
|
|
|
func Version(c *gin.Context) {
|
|
c.JSON(http.StatusOK, gin.H{
|
|
"service": version.Service,
|
|
"version": version.Version,
|
|
"commit": version.Commit,
|
|
"buildTime": version.BuildTime,
|
|
})
|
|
}
|