diff options
author | Meng-Ying Yang <garfield@dexon.org> | 2019-01-02 16:32:43 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@dexon.org> | 2019-01-14 15:26:26 +0800 |
commit | b39d189cf5ad87a7afe0093115e79591b633e21e (patch) | |
tree | f8c53a36501dee5bd669a1b27a31517e0b576f6b /cmd | |
parent | 19c135a2431c71751d4bf3073ec2b42e0f3ff114 (diff) | |
download | dexon-b39d189cf5ad87a7afe0093115e79591b633e21e.tar dexon-b39d189cf5ad87a7afe0093115e79591b633e21e.tar.gz dexon-b39d189cf5ad87a7afe0093115e79591b633e21e.tar.bz2 dexon-b39d189cf5ad87a7afe0093115e79591b633e21e.tar.lz dexon-b39d189cf5ad87a7afe0093115e79591b633e21e.tar.xz dexon-b39d189cf5ad87a7afe0093115e79591b633e21e.tar.zst dexon-b39d189cf5ad87a7afe0093115e79591b633e21e.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.go | 1 | ||||
-rw-r--r-- | cmd/gdex/usage.go | 1 | ||||
-rw-r--r-- | cmd/utils/flags.go | 6 |
3 files changed, 8 insertions, 0 deletions
diff --git a/cmd/gdex/main.go b/cmd/gdex/main.go index df1be3083..df637c01e 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 df63460d0..f819c7695 100644 --- a/cmd/gdex/usage.go +++ b/cmd/gdex/usage.go @@ -243,6 +243,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 4ecc2865d..9d034a8b2 100644 --- a/cmd/utils/flags.go +++ b/cmd/utils/flags.go @@ -654,6 +654,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 @@ -1297,6 +1302,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. |