qos

package
v0.0.0-...-4155a33 Latest Latest
Warning

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

Go to latest
Published: May 26, 2020 License: MIT Imports: 9 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExecCmd

func ExecCmd(timeoutsec int, cmd string, args ...string) (stdoutstr string, stderrstr string, dotimeout bool, err error)

func Fork

func Fork() (*os.Process, error)

Fork and exec this same image without dropping the net.Listener.

func GetInfo

func GetInfo() *info

func Kill

func Kill(pid int) error

func SetMaxCPU

func SetMaxCPU()

Types

type FileLock

type FileLock struct {
	// contains filtered or unexported fields
}

Single represents the name and the open file descriptor

func NewFileLock

func NewFileLock(name string) *FileLock

New creates a Single instance

func (*FileLock) GetFile

func (o *FileLock) GetFile() *os.File

func (*FileLock) GetFileName

func (o *FileLock) GetFileName() string

func (*FileLock) Lock

func (o *FileLock) Lock() error

CheckLock tries to obtain an exclude lock on a lockfile and returns an error if one occurs

func (*FileLock) ReadString

func (o *FileLock) ReadString() (string, error)

func (*FileLock) Terminate

func (o *FileLock) Terminate() error

func (*FileLock) UnLock

func (o *FileLock) UnLock() error

TryUnlock unlocks, closes and removes the lockfile

func (*FileLock) WriteString

func (o *FileLock) WriteString(v interface{}) error

Jump to

Keyboard shortcuts

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