You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2020/12/10 01:49:31 UTC

[GitHub] [skywalking-satellite] nic-chen commented on a change in pull request #8: enhance the plugin mechanism

nic-chen commented on a change in pull request #8:
URL: https://github.com/apache/skywalking-satellite/pull/8#discussion_r539781667



##########
File path: internal/pkg/plugin/registry.go
##########
@@ -18,62 +18,85 @@
 package plugin
 
 import (
+	"errors"
 	"fmt"
 	"reflect"
 	"sync"
 )
 
-// All plugins is wrote in ./plugins dir. The plugin type would be as the next level dirs,
-// such as collector, client, or queue. And the 3rd level is the plugin name, that is also
-// used as key in pluginRegistry.
-
-// reg is the global plugin registry
+// the global plugin registry
 var (

Review comment:
       > This leads to another question, why needs the `package init()` mechanism? All the plugins should be registered due to the configuration files or parameters, aren't they? Otherwise, you will cost the memory for nothing.
   
   +1




----------------------------------------------------------------
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.

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