summaryrefslogtreecommitdiff
path: root/plugins/reload/watcher.go
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2021-01-19 16:47:15 +0300
committerValery Piashchynski <[email protected]>2021-01-19 16:47:15 +0300
commit26f9d35e18ef79d79a5609c6c68f1b6ad38c7aed (patch)
treedd6224660ffd0dcefe2332807203ee1eaf6697b4 /plugins/reload/watcher.go
parent75ebbaac89ce8ebc3ab8de47b16e137844cfcd8a (diff)
Uniform all errors operations
Add new ExecTTL event Update tests Signed-off-by: Valery Piashchynski <[email protected]>
Diffstat (limited to 'plugins/reload/watcher.go')
-rw-r--r--plugins/reload/watcher.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/reload/watcher.go b/plugins/reload/watcher.go
index 08c85af9..8dde38de 100644
--- a/plugins/reload/watcher.go
+++ b/plugins/reload/watcher.go
@@ -102,7 +102,7 @@ func NewWatcher(configs []WatcherConfig, log logger.Logger, options ...Options)
// initFs makes initial map with files
func (w *Watcher) initFs() error {
- const op = errors.Op("init fs")
+ const op = errors.Op("watcher_init_fs")
for srvName, config := range w.watcherConfigs {
fileList, err := w.retrieveFileList(srvName, config)
if err != nil {
@@ -148,7 +148,7 @@ func ConvertIgnored(ignored []string) (map[string]struct{}, error) {
// pass map from outside
func (w *Watcher) retrieveFilesSingle(serviceName, path string) (map[string]os.FileInfo, error) {
- const op = errors.Op("retrieve")
+ const op = errors.Op("watcher_retrieve_files_single")
stat, err := os.Stat(path)
if err != nil {
return nil, err
@@ -192,7 +192,7 @@ outer:
func (w *Watcher) StartPolling(duration time.Duration) error {
w.mu.Lock()
- const op = errors.Op("start polling")
+ const op = errors.Op("watcher_start_polling")
if w.started {
w.mu.Unlock()
return errors.E(op, errors.Str("already started"))