Documentation ¶
Index ¶
- func EmptyReader() io.Reader
- func MergeConfigFileWithFlags(file string, flagConf config.Config) (config.Config, error)
- func NodeFlags(flagConf *config.Config, configFile *string) *pflag.FlagSet
- func NormalizeFlags(f *pflag.FlagSet, name string) pflag.NormalizedName
- func ServerFlags(flagConf *config.Config, configFile *string) *pflag.FlagSet
- func StdinPipe() io.Reader
- func TempConfigFile(c config.Config, name string) (path string, cleanup func())
- func WorkerFlags(flagConf *config.Config, configFile *string) *pflag.FlagSet
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EmptyReader ¶
EmptyReader returns an io.Reader which is empty and immediately closed.
func MergeConfigFileWithFlags ¶
MergeConfigFileWithFlags is a util used by server commands that use flags to set Funnel config values. These commands can also take in the path to a Funnel config file. This function ensures that the config gets set up properly. Flag values override values in the provided config file.
func NormalizeFlags ¶
func NormalizeFlags(f *pflag.FlagSet, name string) pflag.NormalizedName
NormalizeFlags allows for flags to be case and separator insensitive. Use it by passing it to cobra.Command.SetGlobalNormalizationFunc
func ServerFlags ¶
ServerFlags returns a new flag set for configuring a Funnel server
func StdinPipe ¶
StdinPipe will return stdin if it's available, otherwise it will return EmptyReader()
func TempConfigFile ¶
TempConfigFile writes the configuration to a temporary file. Returns: - "path" is the path of the file. - "cleanup" can be called to remove the temporary file.
Types ¶
This section is empty.