Like Prometheus, but for logs.
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.
 
 
 
 
 
 
loki/pkg/util/build/build.go

41 lines
944 B

package build
import (
"runtime"
"github.com/prometheus/common/version"
prom "github.com/prometheus/prometheus/web/api/v1"
)
// Version information passed to Prometheus version package.
// Package path as used by linker changes based on vendoring being used or not,
// so it's easier just to use stable Loki path, and pass it to
// Prometheus in the code.
var (
Version string
Revision string
Branch string
BuildUser string
BuildDate string
GoVersion string
)
func init() {
version.Version = Version
version.Revision = Revision
version.Branch = Branch
version.BuildUser = BuildUser
version.BuildDate = BuildDate
version.GoVersion = runtime.Version()
}
func GetVersion() prom.PrometheusVersion {
return prom.PrometheusVersion{
Version: version.Version,
Revision: version.Revision,
Branch: version.Branch,
BuildUser: version.BuildUser,
BuildDate: version.BuildDate,
GoVersion: version.GoVersion,
}
}