Help us shape the future of Go! Take the 2026 Go Developer Survey

runtimeinfo

package
v0.29.1 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2026 License: Apache-2.0 Imports: 1 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoMachineID = errors.New("no stable machine identifier available")

ErrNoMachineID is returned by GetMachineID when no stable machine identifier is available.

Functions

func WithName

func WithName(n string) opt

func WithVersion

func WithVersion(v string) opt

Types

type RuntimeInfo

type RuntimeInfo interface {
	// application
	GetName() string
	SetName(string)

	GetVersion() string
	SetVersion(string)

	// GetMachineID returns the identifier of the machine the application runs on, or ErrNoMachineID when no stable identifier is available.
	GetMachineID() (string, error)
}

RuntimeInfo describes the runtime the application runs in, grouped into application and machine information.

func New

func New(opts ...opt) RuntimeInfo

Jump to

Keyboard shortcuts

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