version

package
v0.0.0-...-5d73d95 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 24, 2024 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Version   = "unknown"
	Revision  = "unknown"
	Branch    = "unknown"
	GoVersion = runtime.Version()
)

Build information. Populated at build-time. Note: Removed BuildUser and BuildDate for reproducible builds

Functions

func BuildInfoHandler

func BuildInfoHandler(application string, features interface{}) http.Handler

func Info

func Info() string

Info returns version, branch and revision information.

func NewCollector

func NewCollector(program string) prometheus.Collector

NewCollector returns a collector that exports metrics about current version information.

func Print

func Print(program string) string

Print returns version information.

func UserAgent

func UserAgent() string

UserAgent returns build information in format suitable to be used in HTTP User-Agent header.

Types

type BuildInfo

type BuildInfo struct {
	Application string      `json:"application"`
	Version     string      `json:"version"`
	Revision    string      `json:"revision"`
	Branch      string      `json:"branch"`
	GoVersion   string      `json:"goVersion"`
	Features    interface{} `json:"features"`
}

type BuildInfoFeatures

type BuildInfoFeatures struct {
	RulerConfigAPI        string `json:"ruler_config_api,omitempty"`
	AlertmanagerConfigAPI string `json:"alertmanager_config_api,omitempty"`
	QuerySharding         string `json:"query_sharding,omitempty"`
	FederatedRules        string `json:"federated_rules,omitempty"`
}

type BuildInfoResponse

type BuildInfoResponse struct {
	Status    string    `json:"status"`
	BuildInfo BuildInfo `json:"data"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL