version

package module
v0.52.1 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2024 License: Apache-2.0 Imports: 4 Imported by: 33

Documentation

Overview

Package version defines the version of the agent

Index

Constants

This section is empty.

Variables

View Source
var AgentVersion string

AgentVersion contains the version of the Agent. It is populated at build time using build flags, see get_version_ldflags in tasks/utils.py

View Source
var Commit string

Commit is populated with the short commit hash from which the Agent was built

Functions

This section is empty.

Types

type Version

type Version struct {
	Major  int64
	Minor  int64
	Patch  int64
	Pre    string
	Meta   string
	Commit string
}

Version holds SemVer infos for the agent and friends

func Agent

func Agent() (Version, error)

Agent returns the Datadog Agent version.

func New

func New(version, commit string) (Version, error)

New parses a version string like `0.0.0` and a commit identifier and returns a Version instance

func (*Version) GetNumber

func (v *Version) GetNumber() string

GetNumber returns a string containing version numbers only, e.g. `0.0.0`

func (*Version) GetNumberAndPre

func (v *Version) GetNumberAndPre() string

GetNumberAndPre returns a string containing version number and the pre only, e.g. `0.0.0-beta.1`

func (*Version) String

func (v *Version) String() string

Jump to

Keyboard shortcuts

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