info

package
v0.0.60 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package info provides build-time info

Index

Constants

This section is empty.

Variables

View Source
var (
	Version      = "v0.0.1"
	GitCommit    = "master"
	Organization = "vdaas"
	Repository   = "vald"
	BuildTime    = ""

	GoVersion  string
	GoOS       string
	GoArch     string
	CGOEnabled string

	NGTVersion string

	BuildCPUInfoFlags string
)

Functions

func Init

func Init(name string)

Init initializes Detail object only once.

func String

func String() string

String calls String method of global detail object.

Types

type Detail

type Detail struct {
	Version           string       `json:"vald_version,omitempty" yaml:"vald_version,omitempty"`
	ServerName        string       `json:"server_name,omitempty" yaml:"server_name,omitempty"`
	GitCommit         string       `json:"git_commit,omitempty" yaml:"git_commit,omitempty"`
	BuildTime         string       `json:"build_time,omitempty" yaml:"build_time,omitempty"`
	GoVersion         string       `json:"go_version,omitempty" yaml:"go_version,omitempty"`
	GoOS              string       `json:"go_os,omitempty" yaml:"go_os,omitempty"`
	GoArch            string       `json:"go_arch,omitempty" yaml:"go_arch,omitempty"`
	CGOEnabled        string       `json:"cgo_enabled,omitempty" yaml:"cgo_enabled,omitempty"`
	NGTVersion        string       `json:"ngt_version,omitempty" yaml:"ngt_version,omitempty"`
	BuildCPUInfoFlags []string     `json:"build_cpu_info_flags,omitempty" yaml:"build_cpu_info_flags,omitempty"`
	StackTrace        []StackTrace `json:"stack_trace,omitempty" yaml:"stack_trace,omitempty"`
	PrepOnce          sync.Once    `json:"-" yaml:"-"`
}

Detail represents environment information of system and stacktrace information.

func Get

func Get() Detail

Get calls Get method of global detail object.

func (Detail) Get

func (d Detail) Get() Detail

Get returns parased Detail object.

func (Detail) String

func (d Detail) String() string

String returns summary of Detail object.

type StackTrace

type StackTrace struct {
	URL      string `json:"url,omitempty" yaml:"url,omitempty"`
	FuncName string `json:"function_name,omitempty" yaml:"func_name,omitempty"`
	File     string `json:"file,omitempty" yaml:"file,omitempty"`
	Line     int    `json:"line,omitempty" yaml:"line,omitempty"`
}

StackTrace represents stacktrace information about url, function name, file, line ..etc.

Jump to

Keyboard shortcuts

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