watcher

package
Version: v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2020 License: Unlicense Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MD5Watcher

type MD5Watcher struct {
	File string
	// contains filtered or unexported fields
}

MD5Watcher represents a watcher with md5sum checking

func NewMD5Watcher

func NewMD5Watcher(file string, interval int, logger *log.Logger) *MD5Watcher

NewMD5Watcher returns a MD5Watcher

func (*MD5Watcher) Start

func (w *MD5Watcher) Start(ctx context.Context) <-chan string

Start starts a watcher goroutine, and returns a channel that emits a filepath

type SimpleWatcher

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

SimpleWatcher represents a watcher without any specific checking

func NewSimpleWatcher

func NewSimpleWatcher(file string, interval int, logger *log.Logger) *SimpleWatcher

NewSimpleWatcher returns a SimpleWatcher

func (*SimpleWatcher) Start

func (w *SimpleWatcher) Start(ctx context.Context) <-chan string

Start starts a watcher goroutine, and returns a channel that emits a filepath

type Watcher

type Watcher interface {
	Start(context.Context) <-chan string
}

Watcher defines an interface to a watcher

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL