fix(middle-driver): edit middledriver var

This commit is contained in:
Sodesnei 2021-10-04 11:39:01 +08:00
parent 6a1d8a3621
commit a606fbb08a
2 changed files with 7 additions and 3 deletions

View File

@ -3,11 +3,12 @@ package middle
import (
"sync"
"gitee.com/timedb/wheatCache/plugins"
getMiddlewareMap "gitee.com/timedb/wheatCache/plugins/config"
)
func Init() {
getMiddlewareMap.GetMiddlewareMap()
func Init() map[string]plugins.MiddleToolsInterface {
return getMiddlewareMap.GetMiddlewareMap()
}
var (

View File

@ -2,6 +2,7 @@ package middle
import (
"context"
"fmt"
"gitee.com/timedb/wheatCache/pkg/event"
)
@ -27,5 +28,7 @@ func (m *MiddleWare) GetEventDriver() event.DriverInterface {
}
func (m *MiddleWare) work(ctx context.Context) {
getMiddlewareMap := Init()
fmt.Println(getMiddlewareMap)
}