package slave import ( "analysis/app" "analysis/logo" "analysis/util" "context" "plugin" ) // TwoPluginConflict test func TwoPluginConflict(commSoFile, config string) bool { cfg, err := app.ReadConfig(config) if err != nil { logo.Errorln("Slave Read Config Error: ", err) return false } sdk := loadSDK(cfg.SoFile) if sdk == nil { } plug, err := plugin.Open(commSoFile) if err != nil || plug == nil { logo.Errorln("Slave Open so File: ", commSoFile, " Error: ", err) return false } return true } // Run run func Run(ctx context.Context, config, typ, id string, gpu int, shm bool) bool { cfg, err := app.ReadConfig(config) if err != nil { logo.Errorln("Slave Read Config Error: ", err) return false } sdk := loadSDK(cfg.SoFile) if sdk == nil { return false } // func Create(config string, typ, id string, gpu int, shm bool, ipc2Rule string, ruleMaxSize int, fn func(...interface{}), reserved map[string]string) interface{} // func Run(ctx context.Context, i interface{}) { handle := sdk.fnCreate(config, typ, id, gpu, shm, util.ToRuleIPC, 30, logo.Infoln, nil) if handle == nil { logo.Errorln("Create SDK: ", typ, " ID: ", id, " Error") return false } sdk.fnRun(ctx, handle) return true }