osutil

package
v0.0.0-...-37a1ef5 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2025 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RLIMIT_CORE   ResourceId = unix.RLIMIT_CORE
	RLIMIT_NOFILE ResourceId = unix.RLIMIT_NOFILE
	RLIMIT_NPROC  ResourceId = unix.RLIMIT_NPROC
	NO_RLIMIT     uint64     = ^uint64(0)
)

Variables

This section is empty.

Functions

func Execve

func Execve(prog string, argv []string, envv []string) error

func Execvp

func Execvp(prog string, argv []string) error

func Execvpe

func Execvpe(prog string, argv []string, envv []string) error

func ExitErr

func ExitErr(e error)

func ExitMsg

func ExitMsg(message string)

func OptionallyReduceTimerFrequency

func OptionallyReduceTimerFrequency()

func SetResourceLimit

func SetResourceLimit(resource ResourceId, newVal uint64)

func TuneLogging

func TuneLogging(serviceName, component, settings string) bool

func TuneResourceLimits

func TuneResourceLimits()

Types

type BackTicks

type BackTicks int
const (
	BackTicksWithStderr BackTicks = iota
	BackTicksIgnoreStderr
	BackTicksForwardStderr
	SystemCommand
)

func (BackTicks) Run

func (b BackTicks) Run(program string, args ...string) (string, error)

type ExitError

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

func (*ExitError) Error

func (j *ExitError) Error() string

func (*ExitError) String

func (j *ExitError) String() string

type FixSpec

type FixSpec struct {
	UserId   int
	GroupId  int
	DirMode  os.FileMode
	FileMode os.FileMode
}

func NewFixSpec

func NewFixSpec() FixSpec

func (*FixSpec) FixDir

func (spec *FixSpec) FixDir(dirName string)

ensure directory exists with suitable permissions

func (*FixSpec) FixFile

func (spec *FixSpec) FixFile(fileName string)

ensure file has suitable permissions if it exists

type ResourceId

type ResourceId int

func (ResourceId) String

func (rid ResourceId) String() string

Jump to

Keyboard shortcuts

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