You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@yunikorn.apache.org by "wilfred-s (via GitHub)" <gi...@apache.org> on 2023/05/22 00:28:09 UTC

[GitHub] [yunikorn-k8shim] wilfred-s commented on a diff in pull request #592: [YUNIKORN-1745] Add implementation to MockedAPIProvider.AddEventHandler()

wilfred-s commented on code in PR #592:
URL: https://github.com/apache/yunikorn-k8shim/pull/592#discussion_r1199855013


##########
pkg/client/apifactory_mock.go:
##########
@@ -19,22 +19,46 @@
 package client
 
 import (
-	"github.com/apache/yunikorn-k8shim/pkg/common/test"
-	"github.com/apache/yunikorn-k8shim/pkg/conf"
-	"github.com/apache/yunikorn-scheduler-interface/lib/go/si"
+	"sync"
 
+	"go.uber.org/zap"
 	v1 "k8s.io/api/core/v1"
+	schedv1 "k8s.io/api/scheduling/v1"
 	corev1 "k8s.io/client-go/listers/core/v1"
 	storagev1 "k8s.io/client-go/listers/storage/v1"
 	"k8s.io/client-go/tools/cache"
 
 	"github.com/apache/yunikorn-k8shim/pkg/client/clientset/versioned/fake"
+	"github.com/apache/yunikorn-k8shim/pkg/common/test"
+	"github.com/apache/yunikorn-k8shim/pkg/conf"
+	"github.com/apache/yunikorn-k8shim/pkg/log"
+	"github.com/apache/yunikorn-scheduler-interface/lib/go/si"
 )
 
 type MockedAPIProvider struct {
+	sync.Mutex
 	clients *Clients
+
+	stop         chan struct{}
+	eventHandler chan *ResourceEventHandlers
+	events       chan informerEvent
+	running      bool
 }
 
+type operation int
+type informerEvent struct {

Review Comment:
   nit: newline between the types



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@yunikorn.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org