aboutsummaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorMeng-Ying Yang <garfield@dexon.org>2019-01-02 16:32:43 +0800
committerWei-Ning Huang <w@dexon.org>2019-04-09 21:32:55 +0800
commit96b70e6992620e17a1a64663d87d565e09dc1308 (patch)
tree3181dded4381d769ef15048e1fcd42c4980c77fa /cmd
parentb0a5c54715472109072d486f1f95c578efbd3038 (diff)
downloaddexon-96b70e6992620e17a1a64663d87d565e09dc1308.tar
dexon-96b70e6992620e17a1a64663d87d565e09dc1308.tar.gz
dexon-96b70e6992620e17a1a64663d87d565e09dc1308.tar.bz2
dexon-96b70e6992620e17a1a64663d87d565e09dc1308.tar.lz
dexon-96b70e6992620e17a1a64663d87d565e09dc1308.tar.xz
dexon-96b70e6992620e17a1a64663d87d565e09dc1308.tar.zst
dexon-96b70e6992620e17a1a64663d87d565e09dc1308.zip
Indexer plugin extension and custom flags support (#117)
* indexer: ReadOnlyBlockchain returns underlying engine * indexer: plugin configs support custom flags
Diffstat (limited to 'cmd')
-rw-r--r--cmd/gdex/main.go1
-rw-r--r--cmd/gdex/usage.go1
-rw-r--r--cmd/utils/flags.go6
3 files changed, 8 insertions, 0 deletions
diff --git a/cmd/gdex/main.go b/cmd/gdex/main.go
index c054e3ad5..8e08e2d77 100644
--- a/cmd/gdex/main.go
+++ b/cmd/gdex/main.go
@@ -139,6 +139,7 @@ var (
utils.EVMInterpreterFlag,
utils.IndexerEnableFlag,
utils.IndexerPluginFlag,
+ utils.IndexerPluginFlagsFlag,
configFileFlag,
}
diff --git a/cmd/gdex/usage.go b/cmd/gdex/usage.go
index 880e447f3..910b6498b 100644
--- a/cmd/gdex/usage.go
+++ b/cmd/gdex/usage.go
@@ -244,6 +244,7 @@ var AppHelpFlagGroups = []flagGroup{
Flags: []cli.Flag{
utils.IndexerEnableFlag,
utils.IndexerPluginFlag,
+ utils.IndexerPluginFlagsFlag,
},
},
{
diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go
index 96a642850..28ac6b9c6 100644
--- a/cmd/utils/flags.go
+++ b/cmd/utils/flags.go
@@ -659,6 +659,11 @@ var (
Usage: "External indexer plugin shared object path",
Value: "",
}
+ IndexerPluginFlagsFlag = cli.StringFlag{
+ Name: "indexer.plugin-flags",
+ Usage: "External indexer plugin's flags if needed",
+ Value: "",
+ }
)
// MakeDataDir retrieves the currently requested data directory, terminating
@@ -1305,6 +1310,7 @@ func setIndexerConfig(ctx *cli.Context, cfg *dex.Config) {
}
cfg.Indexer.Plugin = ctx.GlobalString(IndexerPluginFlag.Name)
+ cfg.Indexer.PluginFlags = ctx.GlobalString(IndexerPluginFlagsFlag.Name)
}
// SetDashboardConfig applies dashboard related command line flags to the config.