func NewWatcher(paths *model.RevelContainer, eagerRefresh bool) *Watcher {
	return &Watcher{
		forceRefresh:   false,
		lastError:      -1,
		paths:          paths,
		refreshTimerMS: time.Duration(paths.Config.IntDefault("watch.rebuild.delay", 1000)),
		eagerRefresh: eagerRefresh ||
			paths.DevMode &&
				paths.Config.BoolDefault("watch", true) &&
				paths.Config.StringDefault("watch.mode", "normal") == "eager",
		timerMutex:          &sync.Mutex{},
		refreshChannel:      make(chan *utils.SourceError, 10),
		refreshChannelCount: 0,
	}
}
Creates a new watched based on the container
package watcher
import (
	"os"
	"path/filepath"
	"strings"
	"sync"
	"github.com/revel/cmd/model"
	"github.com/revel/cmd/utils"
	"github.com/fsnotify/fsnotify"
	"time"
)
type Listener interface {
	Refresh() *utils.SourceError
}
type DiscerningListener interface {
	Listener
	WatchDir(info os.FileInfo) bool
	WatchFile(basename string) bool
}
type Watcher struct {
	watchers            []*fsnotify.Watcher
	listeners           []Listener
	forceRefresh        bool
	eagerRefresh        bool
	serial              bool
	lastError           int
	notifyMutex         sync.Mutex
	paths               *model.RevelContainer
	refreshTimer        *time.Timer    
	timerMutex          *sync.Mutex    
	refreshChannel      chan *utils.SourceError
	refreshChannelCount int
	refreshTimerMS      time.Duration  
}