version

package
v1.55.0 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2024 License: Apache-2.0 Imports: 7 Imported by: 170

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Command

func Command() *cobra.Command

Command creates version command

func RegisterHandler

func RegisterHandler(mu *http.ServeMux, logger *zap.Logger)

RegisterHandler registers version handler to /version

Types

type Info

type Info struct {
	GitCommit  string `json:"gitCommit"`
	GitVersion string `json:"gitVersion"`
	BuildDate  string `json:"buildDate"`
}

Info holds build information.

func Get

func Get() Info

Get creates and initialized Info object

func (Info) String added in v1.49.0

func (i Info) String() string

type InfoMetrics added in v1.24.0

type InfoMetrics struct {
	BuildInfo metrics.Gauge `metric:"build_info"`
}

InfoMetrics hold a gauge whose tags include build information.

func NewInfoMetrics added in v1.24.0

func NewInfoMetrics(metricsFactory metrics.Factory) *InfoMetrics

NewInfoMetrics returns a InfoMetrics

Jump to

Keyboard shortcuts

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