Documentation ¶
Index ¶
Constants ¶
const ( FlagLogColor = "log_color" FlagLogTimestamp = "log_timestamp" )
Variables ¶
var (
ErrEmptyEnvPrefix = errors.New("envPrefixes parameter must contain at least one prefix")
)
Functions ¶
func InterceptConfigsPreRunHandler ¶
func InterceptConfigsPreRunHandler( cmd *cobra.Command, envPrefixes []string, allowEmptyEnv bool, customAppConfigTemplate string, customAppConfig interface{}, ) error
InterceptConfigsPreRunHandler performs a pre-run function for the root daemon application command. It will create a Viper literal and a default server Context. The server Tendermint configuration will either be read and parsed or created and saved to disk, where the server Context is updated to reflect the Tendermint configuration. It takes custom app config template and config settings to create a custom Tendermint configuration. If the custom template is empty, it uses default-template provided by the server. The Viper literal is used to read and parse the application configuration. Command handlers can fetch the server Context to get the Tendermint configuration or to get access to Viper.
Types ¶
This section is empty.