monitor

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2019 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Watch

func Watch(directory string, batchInterval int, deployments chan<- string)

Watch starts looking for files placed in directory

Types

type Batcher

type Batcher struct {
	*fsnotify.Watcher

	Events chan map[string]bool // Events are returned on this channel
	// contains filtered or unexported fields
}

Batcher batches file watch events in a given interval.

func NewBatcher

func NewBatcher(interval time.Duration) (*Batcher, error)

NewBatcher creates and starts a Batcher with the given time interval.

func (*Batcher) Close

func (b *Batcher) Close()

Close stops the watching of the files.

Jump to

Keyboard shortcuts

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