| | |
| | | "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 |
| | |
| | | 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, |
| | | } |
| | | } |