system

package
v0.15.3 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package system implements system specific functionality.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnableSyslog added in v0.0.17

func EnableSyslog() error

EnableSyslog enables logging to syslog

func GetTimezone

func GetTimezone() (zoneInfoDir, zone string, err error)

GetTimezone returns the current system timezone and its path after zoneInfoPath

func ReadOSVersion added in v0.0.45

func ReadOSVersion(field string) (imgRelease semver.Version, err error)

ReadOSVersion reads `releaseFilePath` and parses VERSION_ID into a `Version` struct

func ReadTimezones

func ReadTimezones(zoneInfoDir string) (listZones []string, err error)

ReadTimezones returns a list of possible time zones from the system Possible arguments for zoneInfoDir:

"" (root dir)
"US"
"posix/America"

func SetTime

func SetTime(t time.Time) (err error)

SetTime sets the system time

func SetTimezone

func SetTimezone(zoneInfoDir, zone string) (err error)

SetTimezone sets the current system time zone

func UpdateTimeFromNetwork

func UpdateTimeFromNetwork() (err error)

UpdateTimeFromNetwork fetches time from ntp server and stores in system and RTC

Types

This section is empty.

Jump to

Keyboard shortcuts

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