summaryrefslogtreecommitdiff
path: root/service/reload/watcher.go
diff options
context:
space:
mode:
authorWolfy-J <[email protected]>2020-02-23 14:14:05 +0300
committerWolfy-J <[email protected]>2020-02-23 14:14:05 +0300
commit9ef9dfed7928e9a96b9545074f8aeb1468fda46c (patch)
treea50850ed8d74cf72964ae755e7e4790c8694a043 /service/reload/watcher.go
parent6a23ccdcda44ea8d90eb174ce3aab99d6b67b495 (diff)
- need batching
Diffstat (limited to 'service/reload/watcher.go')
-rw-r--r--service/reload/watcher.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/service/reload/watcher.go b/service/reload/watcher.go
index 612964c5..6c0ba86c 100644
--- a/service/reload/watcher.go
+++ b/service/reload/watcher.go
@@ -28,16 +28,22 @@ type Event struct {
type WatcherConfig struct {
// service name
serviceName string
+
// recursive or just add by singe directory
recursive bool
+
// directories used per-service
directories []string
+
// simple hook, just CONTAINS
filterHooks func(filename string, pattern []string) error
+
// path to file with files
files map[string]os.FileInfo
+
// ignored directories, used map for O(1) amortized get
ignored map[string]struct{}
+
// filePatterns to ignore
filePatterns []string
}
@@ -194,7 +200,6 @@ outer:
}
filesList[pathToFile] = fileInfoList[i]
-
}
return filesList, nil