You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by GitBox <gi...@apache.org> on 2019/02/08 10:38:21 UTC

[GitHub] astefanutti commented on a change in pull request #413: runtime: ensure that the generated project uses the right camel version

astefanutti commented on a change in pull request #413: runtime: ensure that the generated project uses the right camel version
URL: https://github.com/apache/camel-k/pull/413#discussion_r255013103
 
 

 ##########
 File path: pkg/util/camel/catalog.go
 ##########
 @@ -91,13 +93,111 @@ func (c Catalog) VisitArtifacts(visitor func(string, Artifact) bool) {
 }
 
 // VisitSchemes --
-func (c Catalog) VisitSchemes(visitor func(string, Scheme) bool) {
+func (c RuntimeCatalog) VisitSchemes(visitor func(string, Scheme) bool) {
 	for id, scheme := range c.schemesByID {
 		if !visitor(id, scheme) {
 			break
 		}
 	}
 }
 
+// ******************************
+//
+//
+//
+// ******************************
+
+var defaultCatalog RuntimeCatalog
+var catalogs map[string]RuntimeCatalog
+var catalogsLock sync.Mutex
+
+func init() {
+	c, err := loadCatalog("camel-catalog.yaml")
+	if err != nil {
+		panic(err)
+	}
+
+	defaultCatalog = *c
+
+	catalogs = make(map[string]RuntimeCatalog)
+}
+
 // Runtime --
 
 Review comment:
   Comment is now wrong.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services