diff options
author | Valery Piashchynski <[email protected]> | 2021-01-19 16:47:15 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2021-01-19 16:47:15 +0300 |
commit | 26f9d35e18ef79d79a5609c6c68f1b6ad38c7aed (patch) | |
tree | dd6224660ffd0dcefe2332807203ee1eaf6697b4 /plugins/http/plugin.go | |
parent | 75ebbaac89ce8ebc3ab8de47b16e137844cfcd8a (diff) |
Uniform all errors operations
Add new ExecTTL event
Update tests
Signed-off-by: Valery Piashchynski <[email protected]>
Diffstat (limited to 'plugins/http/plugin.go')
-rw-r--r-- | plugins/http/plugin.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/http/plugin.go b/plugins/http/plugin.go index f35c321b..d9c1729e 100644 --- a/plugins/http/plugin.go +++ b/plugins/http/plugin.go @@ -71,7 +71,7 @@ type Plugin struct { // Init must return configure svc and return true if svc hasStatus enabled. Must return error in case of // misconfiguration. Services must not be used without proper configuration pushed first. func (s *Plugin) Init(cfg config.Configurer, log logger.Logger, server server.Server) error { - const op = errors.Op("http plugin init") + const op = errors.Op("http_plugin_init") err := cfg.UnmarshalKey(PluginName, &s.cfg) if err != nil { return errors.E(op, err) @@ -135,7 +135,7 @@ func (s *Plugin) Serve() chan error { s.Lock() defer s.Unlock() - const op = errors.Op("serve http") + const op = errors.Op("http_plugin_serve") errCh := make(chan error, 2) var err error @@ -298,7 +298,7 @@ func (s *Plugin) Name() string { func (s *Plugin) Reset() error { s.Lock() defer s.Unlock() - const op = errors.Op("http reset") + const op = errors.Op("http_plugin_reset") s.log.Info("HTTP plugin got restart request. Restarting...") s.pool.Destroy(context.Background()) s.pool = nil @@ -387,7 +387,7 @@ func headerContainsUpgrade(r *http.Request, s *Plugin) bool { // append RootCA to the https server TLS config func (s *Plugin) appendRootCa() error { - const op = errors.Op("append root CA") + const op = errors.Op("http_plugin_append_root_ca") rootCAs, err := x509.SystemCertPool() if err != nil { return nil |