zhangmeng
2020-01-20 accc3295d6daacd70494ecd3a08033f505c29f66
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,
   }
}