Documentation ¶
Index ¶
- Variables
- func DefaultValues(rs ...Registerer)
- func DeprecatedFlag(f *flag.FlagSet, name, message string, logger log.Logger)
- func IgnoredFlag(f *flag.FlagSet, name, message string)
- func RegisterFlags(rs ...Registerer)
- type CIDR
- type CIDRSliceCSV
- type DayValue
- type Registerer
- type Secret
- type StringSlice
- type StringSliceCSV
- type Time
- type URLValue
Constants ¶
This section is empty.
Variables ¶
var DeprecatedFlagsUsed = promauto.NewCounter( prometheus.CounterOpts{ Name: "deprecated_flags_inuse_total", Help: "The number of deprecated flags currently set.", })
DeprecatedFlagsUsed is the metric that counts deprecated flags set.
Functions ¶
func DefaultValues ¶
func DefaultValues(rs ...Registerer)
DefaultValues initiates a set of configs (Registerers) with their defaults.
func DeprecatedFlag ¶
DeprecatedFlag logs a warning when you try to use it.
func IgnoredFlag ¶ added in v0.6.0
IgnoredFlag ignores set value, without any warning
func RegisterFlags ¶
func RegisterFlags(rs ...Registerer)
RegisterFlags registers flags with the provided Registerers
Types ¶
type CIDRSliceCSV ¶ added in v1.9.0
type CIDRSliceCSV []CIDR
CIDRSliceCSV is a slice of CIDRs that is parsed from a comma-separated string. It implements flag.Value and yaml Marshalers.
func (CIDRSliceCSV) MarshalYAML ¶ added in v1.9.0
func (c CIDRSliceCSV) MarshalYAML() (interface{}, error)
MarshalYAML implements yaml.Marshaler.
func (*CIDRSliceCSV) Set ¶ added in v1.9.0
func (c *CIDRSliceCSV) Set(s string) error
Set implements flag.Value
func (CIDRSliceCSV) String ¶ added in v1.9.0
func (c CIDRSliceCSV) String() string
String implements flag.Value
func (*CIDRSliceCSV) UnmarshalYAML ¶ added in v1.9.0
func (c *CIDRSliceCSV) UnmarshalYAML(unmarshal func(interface{}) error) error
UnmarshalYAML implements yaml.Unmarshaler.
type DayValue ¶
DayValue is a model.Time that can be used as a flag. NB it only parses days!
func NewDayValue ¶
NewDayValue makes a new DayValue; will round t down to the nearest midnight.
func (DayValue) MarshalYAML ¶ added in v0.7.0
MarshalYAML implements yaml.Marshaler.
func (*DayValue) UnmarshalYAML ¶ added in v0.7.0
UnmarshalYAML implements yaml.Unmarshaler.
type Registerer ¶
Registerer is a thing that can RegisterFlags
type Secret ¶ added in v0.7.0
type Secret struct {
Value string
}
func (Secret) MarshalYAML ¶ added in v0.7.0
MarshalYAML implements yaml.Marshaler.
func (*Secret) UnmarshalYAML ¶ added in v0.7.0
UnmarshalYAML implements yaml.Unmarshaler.
type StringSlice ¶ added in v0.2.0
type StringSlice []string
StringSlice is a slice of strings that implements flag.Value
func (*StringSlice) Set ¶ added in v0.2.0
func (v *StringSlice) Set(s string) error
Set implements flag.Value
func (StringSlice) String ¶ added in v0.2.0
func (v StringSlice) String() string
String implements flag.Value
type StringSliceCSV ¶ added in v1.5.0
type StringSliceCSV []string
StringSliceCSV is a slice of strings that is parsed from a comma-separated string It implements flag.Value and yaml Marshalers
func (StringSliceCSV) MarshalYAML ¶ added in v1.5.0
func (v StringSliceCSV) MarshalYAML() (interface{}, error)
MarshalYAML implements yaml.Marshaler.
func (*StringSliceCSV) Set ¶ added in v1.5.0
func (v *StringSliceCSV) Set(s string) error
Set implements flag.Value
func (StringSliceCSV) String ¶ added in v1.5.0
func (v StringSliceCSV) String() string
String implements flag.Value
func (*StringSliceCSV) UnmarshalYAML ¶ added in v1.5.0
func (v *StringSliceCSV) UnmarshalYAML(unmarshal func(interface{}) error) error
UnmarshalYAML implements yaml.Unmarshaler.
type Time ¶ added in v1.3.0
Time usable as flag or in YAML config.
func (Time) MarshalYAML ¶ added in v1.3.0
MarshalYAML implements yaml.Marshaler.
func (*Time) UnmarshalYAML ¶ added in v1.3.0
UnmarshalYAML implements yaml.Unmarshaler.
type URLValue ¶
URLValue is a url.URL that can be used as a flag.
func (URLValue) MarshalYAML ¶ added in v0.7.0
MarshalYAML implements yaml.Marshaler.
func (*URLValue) UnmarshalYAML ¶
UnmarshalYAML implements yaml.Unmarshaler.