sysutil

package
v0.0.0-...-6c10b0c Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package sysutil is a cross-platform compatibility layer on top of package syscall. It exposes APIs for common operations that require package syscall and re-exports several symbols from package syscall that are known to be safe. Using package syscall directly from other packages is forbidden.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExitStatus

func ExitStatus(err *exec.ExitError) int

ExitStatus returns the exit status contained within an exec.ExitError.

func RefreshSignaledChan

func RefreshSignaledChan() <-chan os.Signal

RefreshSignaledChan returns a channel that will receive an os.Signal whenever the process receives a "refresh" signal (currently SIGHUP). A refresh signal indicates that the user wants to apply nondisruptive updates, like reloading certificates and flushing log files.

On Windows, the returned channel will never receive any values, as Windows does not support signals. Consider exposing a refresh trigger through other means if Windows support is important.

Types

type Errno

type Errno = syscall.Errno

Errno is syscall.Errno.

type FSInfo

type FSInfo struct {
	FreeBlocks  int64
	AvailBlocks int64
	TotalBlocks int64
	BlockSize   int64
}

FSInfo describes a filesystem. It is returned by StatFS.

type Signal

type Signal = syscall.Signal

Signal is syscall.Signal.

Jump to

Keyboard shortcuts

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