[Chenyu Zhao] : add GetPluginByName() method but not implemented
@@ -12,14 +12,15 @@ import (
"github.com/linuxkerneltravel/lmp/models"
"github.com/linuxkerneltravel/lmp/settings"
- "go.uber.org/zap"
"github.com/gin-gonic/gin"
+ "go.uber.org/zap"
)
type Plugin interface {
EnterRun() error
ExitRun() error
Run(chan bool, int)
+ GetPluginByName() Plugin
}
type PluginBase struct {
@@ -40,6 +41,11 @@ func (p *PluginBase) ExitRun() error {
return nil
}
+func (p *PluginBase) GetPluginByName() Plugin {
+ // todo:GetPluginByName() method
+ return nil
+}
+
func (p *PluginBase) Run(exitChan chan bool, collectTime int) {
defer func() {
if err := recover(); err != nil {
