wmedvede commented on code in PR #350:
URL: 
https://github.com/apache/incubator-kie-kogito-serverless-operator/pull/350#discussion_r1461512669


##########
controllers/discovery/discovery.go:
##########
@@ -80,35 +80,34 @@ type ServiceCatalog interface {
        Query(ctx context.Context, uri ResourceUri, outputFormat string) 
(string, error)
 }
 
-type sonataFlowServiceCatalog struct {
+type SonataFlowServiceCatalog struct {
        kubernetesCatalog ServiceCatalog
-       knativeCatalog    ServiceCatalog
+       KnativeCatalog    ServiceCatalog
        openshiftCatalog  ServiceCatalog
 }
 
 // NewServiceCatalog returns a new ServiceCatalog configured to resolve 
kubernetes, knative, and openshift resource addresses.
 func NewServiceCatalog(cli client.Client, knDiscoveryClient 
*KnDiscoveryClient, openShiftDiscoveryClient *OpenShiftDiscoveryClient) 
ServiceCatalog {
-       return &sonataFlowServiceCatalog{
+       return &SonataFlowServiceCatalog{
                kubernetesCatalog: newK8SServiceCatalog(cli),
-               knativeCatalog:    newKnServiceCatalog(knDiscoveryClient),
+               KnativeCatalog:    newKnServiceCatalog(knDiscoveryClient),
                openshiftCatalog:  
newOpenShiftServiceCatalog(openShiftDiscoveryClient),
        }
 }
 
 func NewServiceCatalogForConfig(cli client.Client, cfg *rest.Config) 
ServiceCatalog {
-       return &sonataFlowServiceCatalog{
+       return &SonataFlowServiceCatalog{
                kubernetesCatalog: newK8SServiceCatalog(cli),
-               knativeCatalog:    newKnServiceCatalogForConfig(cfg),
-               openshiftCatalog:  
newOpenShiftServiceCatalogForClientAndConfig(cli, cfg),

Review Comment:
   I think you can add a function here 
https://github.com/apache/incubator-kie-kogito-serverless-operator/blob/f0d9068f9fde4ab2476b76c1c75d5567e1428fc2/controllers/knative/knative.go
  for that purpose, and rollback the changes in sonataFlowServiceCatalog.
   
   The ServiceCatalog implementation we have, far from perfect, is intended to 
use the interface and not relay on the particular implementation and it's 
internal fields.
   



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to