version

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2021 License: Apache-2.0 Imports: 3 Imported by: 1

Documentation

Overview

Package version gets the kernel and version information from the /proc/version file.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Kernel

type Kernel struct {
	OS          string `json:"os"`
	Version     string `json:"version"`
	CompileUser string `json:"compile_user"`
	GCC         string `json:"gcc"`
	OSGCC       string `json:"os_gcc"`
	Type        string `json:"type"`
	CompileDate string `json:"compile_date"`
	Arch        string `json:"arch"`
}

Kernel holds information about the kernel and version.

func Get

func Get() (k *Kernel, err error)

Get gets the kernel information from the /proc/version file using the package's global profiler.

func (*Kernel) SetArch

func (k *Kernel) SetArch()

Set the Version's architecture information. This is the last segment of the Version.

type Profiler

type Profiler struct {
	joe.Procer
	*joe.Buffer
}

Profiler processes the version information, /proc/version.

func NewProfiler

func NewProfiler() (prof *Profiler, err error)

Returns an initialized Profiler; ready to use.

func (*Profiler) Get

func (prof *Profiler) Get() (k *Kernel, err error)

Get gets the kernel information from the /proc/version file.

func (*Profiler) Reset

func (prof *Profiler) Reset() error

Reset resources: after reset, the profiler is ready to be used again.

Directories

Path Synopsis
Package version gets the kernel and version information from the /proc/version file.
Package version gets the kernel and version information from the /proc/version file.
Package version gets the kernel and version information from the /proc/version file.
Package version gets the kernel and version information from the /proc/version file.

Jump to

Keyboard shortcuts

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