diff --git a/main.go b/main.go index 435ede0cf04ecdd83ce8f7fa7a435228807efb3f..d510157cf00a771428f2352cba7e6933e88615f0 100644 --- a/main.go +++ b/main.go @@ -4,25 +4,11 @@ import ( "net/http" _ "net/http/pprof" - "github.com/iotaledger/goshimmer/plugins/analysis" - "github.com/iotaledger/goshimmer/plugins/autopeering" - "github.com/iotaledger/goshimmer/plugins/banner" - "github.com/iotaledger/goshimmer/plugins/cli" + "github.com/iotaledger/goshimmer/pluginmgr/core" + "github.com/iotaledger/goshimmer/pluginmgr/research" + "github.com/iotaledger/goshimmer/pluginmgr/ui" + "github.com/iotaledger/goshimmer/pluginmgr/webapi" "github.com/iotaledger/goshimmer/plugins/config" - "github.com/iotaledger/goshimmer/plugins/gossip" - "github.com/iotaledger/goshimmer/plugins/gracefulshutdown" - "github.com/iotaledger/goshimmer/plugins/logger" - "github.com/iotaledger/goshimmer/plugins/metrics" - "github.com/iotaledger/goshimmer/plugins/portcheck" - "github.com/iotaledger/goshimmer/plugins/remotelog" - "github.com/iotaledger/goshimmer/plugins/spa" - "github.com/iotaledger/goshimmer/plugins/tangle" - "github.com/iotaledger/goshimmer/plugins/webapi" - webapi_broadcastData "github.com/iotaledger/goshimmer/plugins/webapi/broadcastData" - webapi_gtta "github.com/iotaledger/goshimmer/plugins/webapi/gtta" - webapi_spammer "github.com/iotaledger/goshimmer/plugins/webapi/spammer" - webapi_auth "github.com/iotaledger/goshimmer/plugins/webauth" - "github.com/iotaledger/hive.go/node" ) @@ -32,38 +18,9 @@ func main() { go http.ListenAndServe("localhost:6061", nil) // pprof Server for Debbuging Mutexes node.Run( - node.Plugins( - banner.PLUGIN, - config.PLUGIN, - logger.PLUGIN, - cli.PLUGIN, - remotelog.PLUGIN, - portcheck.PLUGIN, - - autopeering.PLUGIN, - tangle.PLUGIN, - gossip.PLUGIN, - gracefulshutdown.PLUGIN, - - analysis.PLUGIN, - metrics.PLUGIN, - - webapi.PLUGIN, - webapi_auth.PLUGIN, - webapi_gtta.PLUGIN, - webapi_spammer.PLUGIN, - webapi_broadcastData.PLUGIN, - - spa.PLUGIN, - - /* - webapi_getTransactionTrytesByHash.PLUGIN, - webapi_getTransactionObjectsByHash.PLUGIN, - webapi_findTransactionHashes.PLUGIN, - webapi_getNeighbors.PLUGIN, - - //graph.PLUGIN, - */ - ), + core.PLUGINS, + research.PLUGINS, + ui.PLUGINS, + webapi.PLUGINS, ) } diff --git a/pluginmgr/core/plugins.go b/pluginmgr/core/plugins.go new file mode 100644 index 0000000000000000000000000000000000000000..b4dfb2a0cd319f74ce4516dd6d4ac7139e3beb14 --- /dev/null +++ b/pluginmgr/core/plugins.go @@ -0,0 +1,26 @@ +package core + +import ( + "github.com/iotaledger/goshimmer/plugins/autopeering" + "github.com/iotaledger/goshimmer/plugins/banner" + "github.com/iotaledger/goshimmer/plugins/cli" + "github.com/iotaledger/goshimmer/plugins/config" + "github.com/iotaledger/goshimmer/plugins/gossip" + "github.com/iotaledger/goshimmer/plugins/gracefulshutdown" + "github.com/iotaledger/goshimmer/plugins/logger" + "github.com/iotaledger/goshimmer/plugins/portcheck" + "github.com/iotaledger/goshimmer/plugins/tangle" + "github.com/iotaledger/hive.go/node" +) + +var PLUGINS = node.Plugins( + banner.PLUGIN, + config.PLUGIN, + logger.PLUGIN, + cli.PLUGIN, + portcheck.PLUGIN, + autopeering.PLUGIN, + tangle.PLUGIN, + gossip.PLUGIN, + gracefulshutdown.PLUGIN, +) diff --git a/pluginmgr/research/plugins.go b/pluginmgr/research/plugins.go new file mode 100644 index 0000000000000000000000000000000000000000..5618c8d15284b8ad8d992782983b40528195360b --- /dev/null +++ b/pluginmgr/research/plugins.go @@ -0,0 +1,14 @@ +package research + +import ( + "github.com/iotaledger/goshimmer/plugins/analysis" + "github.com/iotaledger/goshimmer/plugins/metrics" + "github.com/iotaledger/goshimmer/plugins/remotelog" + "github.com/iotaledger/hive.go/node" +) + +var PLUGINS = node.Plugins( + remotelog.PLUGIN, + analysis.PLUGIN, + metrics.PLUGIN, +) diff --git a/pluginmgr/ui/plugins.go b/pluginmgr/ui/plugins.go new file mode 100644 index 0000000000000000000000000000000000000000..ddc66b11b3ce2b00a49a67095e6176dd9d3e2e68 --- /dev/null +++ b/pluginmgr/ui/plugins.go @@ -0,0 +1,12 @@ +package ui + +import ( + "github.com/iotaledger/goshimmer/plugins/graph" + "github.com/iotaledger/goshimmer/plugins/spa" + "github.com/iotaledger/hive.go/node" +) + +var PLUGINS = node.Plugins( + spa.PLUGIN, + graph.PLUGIN, +) diff --git a/pluginmgr/webapi/plugins.go b/pluginmgr/webapi/plugins.go new file mode 100644 index 0000000000000000000000000000000000000000..7835b23b228a8da719fcade661ba676cefa1ae7b --- /dev/null +++ b/pluginmgr/webapi/plugins.go @@ -0,0 +1,26 @@ +package webapi + +import ( + "github.com/iotaledger/goshimmer/plugins/webapi" + webapi_broadcastData "github.com/iotaledger/goshimmer/plugins/webapi/broadcastData" + webapi_findTransactionHashes "github.com/iotaledger/goshimmer/plugins/webapi/findTransactionHashes" + webapi_getNeighbors "github.com/iotaledger/goshimmer/plugins/webapi/getNeighbors" + webapi_getTransactionObjectsByHash "github.com/iotaledger/goshimmer/plugins/webapi/getTransactionObjectsByHash" + webapi_getTransactionTrytesByHash "github.com/iotaledger/goshimmer/plugins/webapi/getTransactionTrytesByHash" + webapi_gtta "github.com/iotaledger/goshimmer/plugins/webapi/gtta" + webapi_spammer "github.com/iotaledger/goshimmer/plugins/webapi/spammer" + webapi_auth "github.com/iotaledger/goshimmer/plugins/webauth" + "github.com/iotaledger/hive.go/node" +) + +var PLUGINS = node.Plugins( + webapi.PLUGIN, + webapi_auth.PLUGIN, + webapi_gtta.PLUGIN, + webapi_spammer.PLUGIN, + webapi_broadcastData.PLUGIN, + webapi_getTransactionTrytesByHash.PLUGIN, + webapi_getTransactionObjectsByHash.PLUGIN, + webapi_findTransactionHashes.PLUGIN, + webapi_getNeighbors.PLUGIN, +)