summaryrefslogtreecommitdiff
path: root/plugins/config
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2021-04-30 13:09:18 +0300
committerValery Piashchynski <[email protected]>2021-04-30 13:09:18 +0300
commitd0dccb0c761df45da7fba00340f1cd5c66c71711 (patch)
tree8b1bc547a843dd9601faee26cf1c92876cfbb054 /plugins/config
parent50aa751dcefc0ab0e96594a5f111ead316a34a70 (diff)
- Add Availabler interface implementaion for all plugins
- Add tests Signed-off-by: Valery Piashchynski <[email protected]>
Diffstat (limited to 'plugins/config')
-rwxr-xr-xplugins/config/plugin.go15
1 files changed, 15 insertions, 0 deletions
diff --git a/plugins/config/plugin.go b/plugins/config/plugin.go
index eb7146b2..a5215226 100755
--- a/plugins/config/plugin.go
+++ b/plugins/config/plugin.go
@@ -10,6 +10,8 @@ import (
"github.com/spiral/errors"
)
+const PluginName string = "config"
+
type Viper struct {
viper *viper.Viper
Path string
@@ -118,6 +120,19 @@ func (v *Viper) GetCommonConfig() *General {
return v.CommonConfig
}
+func (v *Viper) Serve() chan error {
+ return make(chan error, 1)
+}
+
+func (v *Viper) Stop() error {
+ return nil
+}
+
+// Name returns user-friendly plugin name
+func (v *Viper) Name() string {
+ return PluginName
+}
+
// Available interface implementation
func (v *Viper) Available() bool {
return true