summaryrefslogtreecommitdiff
path: root/plugins/rpc
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2020-12-02 10:57:10 +0300
committerGitHub <[email protected]>2020-12-02 10:57:10 +0300
commitbdabf97a6463c0e3897063235f3d556d4f75c4bd (patch)
treed0b61be0ee53e793d7350c7805db18c31f7af3c4 /plugins/rpc
parent70910821a0ffb10316f9970a2fec4c3379d10675 (diff)
parent509db1b16de783819932e34703dec42bd99b51c9 (diff)
Merge pull request #421 from spiral/plugin/headers
[RR2] Headers plugin
Diffstat (limited to 'plugins/rpc')
-rwxr-xr-xplugins/rpc/plugin.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/plugins/rpc/plugin.go b/plugins/rpc/plugin.go
index 82b30563..24624d91 100755
--- a/plugins/rpc/plugin.go
+++ b/plugins/rpc/plugin.go
@@ -13,8 +13,8 @@ import (
"github.com/spiral/roadrunner/v2/plugins/config"
)
-// ServiceName contains default service name.
-const ServiceName = "RPC"
+// PluginName contains default plugin name.
+const PluginName = "RPC"
type pluggable struct {
service rpc_.RPCer
@@ -34,11 +34,11 @@ type Plugin struct {
// Init rpc service. Must return true if service is enabled.
func (s *Plugin) Init(cfg config.Configurer, log log.Logger) error {
const op = errors.Op("RPC Init")
- if !cfg.Has(ServiceName) {
+ if !cfg.Has(PluginName) {
return errors.E(op, errors.Disabled)
}
- err := cfg.UnmarshalKey(ServiceName, &s.cfg)
+ err := cfg.UnmarshalKey(PluginName, &s.cfg)
if err != nil {
return err
}
@@ -120,7 +120,7 @@ func (s *Plugin) Stop() error {
// Name contains service name.
func (s *Plugin) Name() string {
- return ServiceName
+ return PluginName
}
// Depends declares services to collect for RPC.