helper

package
v2.8.0 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2024 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const LogLevelStringDefaultValue = "ERROR"

Variables

This section is empty.

Functions

func CreateThreshold

func CreateThreshold(d time.Duration) <-chan time.Time

func FilterError added in v2.2.6

func FilterError(cmds []*exec.Cmd, err error) ([]*exec.Cmd, error)

func IsDir

func IsDir(path string) bool

func IsExist

func IsExist(path string) bool

func IsNotExist

func IsNotExist(path string) bool

func SetupForOs added in v2.7.0

func SetupForOs(cmd *exec.Cmd)

Types

type EmptyCmdError

type EmptyCmdError error

func NewEmptyCmdError

func NewEmptyCmdError() EmptyCmdError

type LogLevel

type LogLevel uint
const (
	ERROR LogLevel = iota
	INFO
	DEBUG
)

type LogLevelString

type LogLevelString string

func (LogLevelString) GetLogLevel

func (l LogLevelString) GetLogLevel() LogLevel

type Logger added in v2.6.0

type Logger interface {
	Debug(string)
	Info(string)
	Error(string)
}
var GlobalLogger Logger

func NewBasicLogger

func NewBasicLogger(logLevel LogLevel) Logger

type WatcherContext added in v2.7.0

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

func NewWatcherContext added in v2.7.0

func NewWatcherContext() *WatcherContext

func (*WatcherContext) ApplyGracefulShutdown added in v2.7.0

func (w *WatcherContext) ApplyGracefulShutdown(cmds []*exec.Cmd)

func (*WatcherContext) CancelAndNew added in v2.7.0

func (w *WatcherContext) CancelAndNew()

func (*WatcherContext) Context added in v2.7.0

func (w *WatcherContext) Context() context.Context

func (*WatcherContext) MarkStart added in v2.7.0

func (w *WatcherContext) MarkStart()

func (*WatcherContext) SetWaitNumber added in v2.7.0

func (w *WatcherContext) SetWaitNumber(num int)

func (*WatcherContext) WaitStart added in v2.7.0

func (w *WatcherContext) WaitStart()

Jump to

Keyboard shortcuts

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