From 699d1c7f48d975d042f01659f4772b2153d36882 Mon Sep 17 00:00:00 2001 From: Meng-Ying Yang Date: Wed, 2 Jan 2019 16:32:43 +0800 Subject: Indexer plugin extension and custom flags support (#117) * indexer: ReadOnlyBlockchain returns underlying engine * indexer: plugin configs support custom flags --- cmd/utils/flags.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'cmd/utils') 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. -- cgit