utils

package
v0.0.0-...-77c5d82 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CGroupPath         = "/proc/self/cgroup"
	CGroupFolderPrefix = "/sys/fs/cgroup/memory"
	MemLimitFileSuffix = "/memory.limit_in_bytes"
	MemUsageFileSuffix = "/memory.usage_in_bytes"
)

Variables

This section is empty.

Functions

func GetCGroupAvailableMem

func GetCGroupAvailableMem() (retVal uint64, err error)

func GetStdLogger

func GetStdLogger(l *LogHandle, lvl logrus.Level) *glog.Logger

func InitLoggers

func InitLoggers(logToSyslog bool)

func MyUserAndGroup

func MyUserAndGroup() (int, int)

MyUserAndGroup returns the UID and GID of this process.

Types

type LogHandle

type LogHandle struct {
	logrus.Logger

	Lvl *logrus.Level
	// contains filtered or unexported fields
}

func GetLogger

func GetLogger(name string) *LogHandle

func NewLogger

func NewLogger(name string) *LogHandle

func (*LogHandle) Format

func (l *LogHandle) Format(e *logrus.Entry) ([]byte, error)

func (*LogHandle) Log

func (l *LogHandle) Log(args ...interface{})

for aws.Logger

Jump to

Keyboard shortcuts

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