watcher

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultSecond = 2
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Watcher

type Watcher struct {
	Second time.Duration
}

func (*Watcher) Run

func (w *Watcher) Run(fn WatcherFunc)

type WatcherFlags

type WatcherFlags struct {
	Second int
	Watch  bool
}

func NewWatcherFlags

func NewWatcherFlags() *WatcherFlags

func (*WatcherFlags) AddFlags

func (w *WatcherFlags) AddFlags(cmd *cobra.Command, usage string)

func (*WatcherFlags) ToWatch

func (w *WatcherFlags) ToWatch(fn WatcherFunc)

type WatcherFunc

type WatcherFunc func(chan bool)

Jump to

Keyboard shortcuts

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