From accc3295d6daacd70494ecd3a08033f505c29f66 Mon Sep 17 00:00:00 2001 From: zhangmeng <775834166@qq.com> Date: 星期一, 20 一月 2020 11:15:27 +0800 Subject: [PATCH] replace sdkhelper with local common --- app/master/dbfetcher.go | 22 ++++++---------------- 1 files changed, 6 insertions(+), 16 deletions(-) diff --git a/app/master/dbfetcher.go b/app/master/dbfetcher.go index 56c5633..186fe9d 100644 --- a/app/master/dbfetcher.go +++ b/app/master/dbfetcher.go @@ -5,13 +5,12 @@ "analysis/logo" "plugin" - "basic.com/libgowrapper/sdkstruct.git" + "basic.com/valib/pubsub.git" ) // Fetcher db type Fetcher struct { - fnInitDBAPI func(string, int, int, int, func(...interface{})) - fnSDKInfo func() []sdkstruct.SDKInfo + fnInit func(string, string, int, []string, string) (chan pubsub.Message, error) } // NewFetcher new @@ -23,23 +22,14 @@ return nil } - fn, err := app.LoadFunc(plug, soFile, "InitDBAPI") + fn, err := app.LoadFunc(plug, soFile, "Init") if err != nil { - logo.Infoln("Lookup Func InitDBAPI From File: ", soFile, " Error") + logo.Infoln("Lookup Func Init From File: ", soFile, " Error") return nil } - fnInit := fn.(func(string, int, int, int, func(...interface{}))) - - fn, err = app.LoadFunc(plug, soFile, "SDKInfo") - if err != nil { - logo.Infoln("Lookup Func SDKInfo From File: ", soFile, " Error") - return nil - } - - fnSDKInfo := fn.(func() []sdkstruct.SDKInfo) + fnInit := fn.(func(string, string, int, []string, string) (chan pubsub.Message, error)) return &Fetcher{ - fnInitDBAPI: fnInit, - fnSDKInfo: fnSDKInfo, + fnInit: fnInit, } } -- Gitblit v1.8.0