added client generator inteface (#2854)

* added client generator inteface
* start router service asynchronously

Signed-off-by: Vardhaman Surana <vardhaman.surana@infracloud.io>
This commit is contained in:
Vardhaman Surana
2023-10-18 18:59:28 +05:30
committed by GitHub
parent c6329ee3db
commit fc97b7609b
6 changed files with 46 additions and 45 deletions
+2 -2
View File
@@ -249,8 +249,8 @@ func (executor *Executor) getFunctionServiceFromCache(ctx context.Context, fn *f
// StartExecutor Starts executor and the executor components such as Poolmgr,
// deploymgr and potential future executor types
func StartExecutor(ctx context.Context, logger *zap.Logger, port int) error {
clientGen := crd.NewClientGenerator()
func StartExecutor(ctx context.Context, clientGen crd.ClientGeneratorInterface, logger *zap.Logger, port int) error {
fissionClient, err := clientGen.GetFissionClient()
if err != nil {
return errors.Wrap(err, "error making the fission client")
+1 -1
View File
@@ -182,7 +182,7 @@ func TestExecutor(t *testing.T) {
// create poolmgr
port := 9999
err = StartExecutor(ctx, logger, port)
err = StartExecutor(ctx, crd.NewClientGenerator(), logger, port)
if err != nil {
log.Panicf("failed to start poolmgr: %v", err)
}