summaryrefslogtreecommitdiff
path: root/plugins/reload
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/reload')
-rw-r--r--plugins/reload/config.go2
-rw-r--r--plugins/reload/plugin.go4
-rw-r--r--plugins/reload/watcher.go6
3 files changed, 6 insertions, 6 deletions
diff --git a/plugins/reload/config.go b/plugins/reload/config.go
index 9ca2c0dc..9bce6b25 100644
--- a/plugins/reload/config.go
+++ b/plugins/reload/config.go
@@ -43,7 +43,7 @@ func InitDefaults(c *Config) {
// Valid validates the configuration.
func (c *Config) Valid() error {
- const op = errors.Op("config validation [reload plugin]")
+ const op = errors.Op("reload_plugin_valid")
if c.Interval < time.Second {
return errors.E(op, errors.Str("too short interval"))
}
diff --git a/plugins/reload/plugin.go b/plugins/reload/plugin.go
index eb1b61b2..93760b8a 100644
--- a/plugins/reload/plugin.go
+++ b/plugins/reload/plugin.go
@@ -26,7 +26,7 @@ type Plugin struct {
// Init controller service
func (s *Plugin) Init(cfg config.Configurer, log logger.Logger, res resetter.Resetter) error {
- const op = errors.Op("reload plugin init")
+ const op = errors.Op("reload_plugin_init")
s.cfg = &Config{}
InitDefaults(s.cfg)
err := cfg.UnmarshalKey(PluginName, &s.cfg)
@@ -74,7 +74,7 @@ func (s *Plugin) Init(cfg config.Configurer, log logger.Logger, res resetter.Res
}
func (s *Plugin) Serve() chan error {
- const op = errors.Op("reload plugin serve")
+ const op = errors.Op("reload_plugin_serve")
errCh := make(chan error, 1)
if s.cfg.Interval < time.Second {
errCh <- errors.E(op, errors.Str("reload interval is too fast"))
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"))