Documentation
¶
Index ¶
- func EmptyReader() io.Reader
- func MergeConfigFileWithFlags(file string, flagConf *config.Config) (*config.Config, error)
- func NewEventFileWriter(path string, log *logger.Logger) (events.Writer, 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 WorkerFlags(flagConf *config.Config, configFile *string) *pflag.FlagSet
- type DurationValue
- type TimeoutConfigValue
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. FUNNEL_CONFIG supplies the file when none is supplied; FUNNEL_LOG_LEVEL overrides the file's log level, but explicit flags take priority.
func NewEventFileWriter ¶
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
Types ¶
type DurationValue ¶
type DurationValue struct {
D **durationpb.Duration // Pointer to a pointer to handle struct fields
}
DurationValue is a pflag.Value implementation for durationpb.Duration.
func (*DurationValue) Set ¶
func (d *DurationValue) Set(s string) error
Set parses a string into a durationpb.Duration.
func (*DurationValue) String ¶
func (d *DurationValue) String() string
String returns the string representation of the duration.
type TimeoutConfigValue ¶
type TimeoutConfigValue struct {
TC **config.TimeoutConfig // Pointer to a pointer to handle struct fields
}
TimeoutConfigValue is a pflag.Value implementation for config.TimeoutConfig.
func (*TimeoutConfigValue) Set ¶
func (tcv *TimeoutConfigValue) Set(s string) error
Set parses a string into a config.TimeoutConfig.
func (*TimeoutConfigValue) String ¶
func (tcv *TimeoutConfigValue) String() string
String returns the string representation of the TimeoutConfig.
func (*TimeoutConfigValue) Type ¶
func (tcv *TimeoutConfigValue) Type() string
Type returns the flag type.