metadata

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Commit  string
	Date    string
	Version string
)

Functions

func SetCertInfo

func SetCertInfo(creationTime time.Time, fingerprint string)

SetCertInfo stores the creation time and fingerprint of the in-use mTLS certificate.

func SetWeepMethod

func SetWeepMethod(command string)

func StartupTime

func StartupTime() string

Types

type InstanceInfo

type InstanceInfo struct {
	Hostname              string `json:"hostname" yaml:"hostname"`
	Username              string `json:"username" yaml:"username"`
	CertAgeSeconds        int    `json:"cert_age_seconds,omitempty" yaml:"cert_age_seconds"`
	CertFingerprintSHA256 string `json:"cert_fingerprint_sha256,omitempty" yaml:"cert_fingerprint_sha256"`
	WeepVersion           string `json:"weep_version" yaml:"weep_version"`
	WeepMethod            string `json:"weep_method" yaml:"weep_method"`
}

func GetInstanceInfo

func GetInstanceInfo() *InstanceInfo

GetInstanceInfo populates and returns an InstanceInfo, most likely to be used as request metadata.

type VersionInfo

type VersionInfo struct {
	Revision  string
	Version   string
	BuildDate string
}

VersionInfo contains information about the program's version.

func GetVersion

func GetVersion() *VersionInfo

GetVersion returns the program's version information via a VersionInfo pointer.

func (*VersionInfo) String

func (c *VersionInfo) String() string

Jump to

Keyboard shortcuts

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