utils

package
v0.8.2 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Retry

func Retry[T comparable](ctx context.Context, retryFunc func() (T, error), retryMsg string) (T, error)

func Sleep

func Sleep(ctx context.Context, wait time.Duration) bool

Types

type FileWatcher added in v0.8.2

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

FileWatcher is an utility that

func NewFileWatcher added in v0.8.2

func NewFileWatcher(path string) (*FileWatcher, error)

func (*FileWatcher) Start added in v0.8.2

func (fw *FileWatcher) Start(changeHandler func()) error

func (*FileWatcher) Stop added in v0.8.2

func (fw *FileWatcher) Stop() error

Jump to

Keyboard shortcuts

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