util

package
v0.0.0-...-4892902 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RefreshDelayInitial = time.Second
	RefreshDelayFactor  = 2.0
	RefreshDelayMax     = 5 * time.Minute
	RefreshWaitDelay    = time.Minute // delays between polling for refresh time.
)

Variables

View Source
var StopRetriesErr = errors.New("RetryLoop is stopped by handler")

Functions

func ChangeFilePermissions

func ChangeFilePermissions(fileName string, userName string, groupName string, mode int) error

func DirExists

func DirExists(path string) (bool, error)

func FileExists

func FileExists(path string) (bool, error)

FileExists returns true if path exists

func IsFileExecutable

func IsFileExecutable(f os.FileInfo) bool

func MatchDomainPattern

func MatchDomainPattern(pattern, in string) bool

Types

type PostponedRetryLoop

type PostponedRetryLoop struct {
	StartAfter time.Time
	Handler    func(context.Context) error
	Backoff    *exponential.Backoff
	// contains filtered or unexported fields
}

func (*PostponedRetryLoop) RunLoop

func (r *PostponedRetryLoop) RunLoop(ctx context.Context) error

func (*PostponedRetryLoop) Stop

func (r *PostponedRetryLoop) Stop()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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