device

package
v2.4.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: MIT Imports: 2 Imported by: 36

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddVersion added in v1.5.3

func AddVersion(framework, version string)

AddVersion permits a framework to register its version, assuming it's one of the officially supported frameworks.

func GetHostname

func GetHostname() string

GetHostname returns the hostname of the current device. Caches the hostname between calls to ensure this is performant. Returns a blank string in case that the hostname cannot be identified.

Types

type RuntimeVersions added in v1.5.3

type RuntimeVersions struct {
	Go string `json:"go"`

	Gin     string `json:"gin,omitempty"`
	Martini string `json:"martini,omitempty"`
	Negroni string `json:"negroni,omitempty"`
	Revel   string `json:"revel,omitempty"`
}

RuntimeVersions define the various versions of Go and any framework that may be in use. As a user of the notifier you're unlikely to need to modify this struct. As such, the authors reserve the right to introduce breaking changes to the properties in this struct. In particular the framework versions are liable to change in new versions of the notifier in minor/patch versions.

func GetRuntimeVersions added in v1.5.3

func GetRuntimeVersions() *RuntimeVersions

GetRuntimeVersions retrieves the recorded runtime versions in a goroutine-safe manner.

Jump to

Keyboard shortcuts

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