diff options
author | Valery Piashchynski <[email protected]> | 2020-12-02 10:57:10 +0300 |
---|---|---|
committer | GitHub <[email protected]> | 2020-12-02 10:57:10 +0300 |
commit | bdabf97a6463c0e3897063235f3d556d4f75c4bd (patch) | |
tree | d0b61be0ee53e793d7350c7805db18c31f7af3c4 /plugins/http/plugin.go | |
parent | 70910821a0ffb10316f9970a2fec4c3379d10675 (diff) | |
parent | 509db1b16de783819932e34703dec42bd99b51c9 (diff) |
Merge pull request #421 from spiral/plugin/headers
[RR2] Headers plugin
Diffstat (limited to 'plugins/http/plugin.go')
-rw-r--r-- | plugins/http/plugin.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/plugins/http/plugin.go b/plugins/http/plugin.go index 8e8957bd..79e8aa94 100644 --- a/plugins/http/plugin.go +++ b/plugins/http/plugin.go @@ -27,8 +27,8 @@ import ( ) const ( - // ID contains default service name. - ServiceName = "http" + // PluginName declares plugin name. + PluginName = "http" // EventInitSSL thrown at moment of https initialization. SSL server passed as context. EventInitSSL = 750 @@ -78,7 +78,7 @@ func (s *Plugin) AddListener(listener util.EventListener) { // misconfiguration. Services must not be used without proper configuration pushed first. func (s *Plugin) Init(cfg config.Configurer, log log.Logger, server factory.Server) error { const op = errors.Op("http Init") - err := cfg.UnmarshalKey(ServiceName, &s.cfg) + err := cfg.UnmarshalKey(PluginName, &s.cfg) if err != nil { return errors.E(op, err) } @@ -287,7 +287,7 @@ func (s *Plugin) Workers() []roadrunner.WorkerBase { } func (s *Plugin) Name() string { - return ServiceName + return PluginName } func (s *Plugin) Reset() error { @@ -298,7 +298,7 @@ func (s *Plugin) Reset() error { s.pool.Destroy(context.Background()) // re-read the config - err := s.configurer.UnmarshalKey(ServiceName, &s.cfg) + err := s.configurer.UnmarshalKey(PluginName, &s.cfg) if err != nil { return errors.E(op, err) } |