Documentation
¶
Index ¶
- Variables
- func RegisterExtension(e Extension)
- func WithConfig(ctx context.Context, config *Config) context.Context
- type ArbitraryOption
- func (this *ArbitraryOption) AddToCommand(cmd *cobra.Command)
- func (this *ArbitraryOption) BoolValue() bool
- func (this *ArbitraryOption) Changed() bool
- func (this *ArbitraryOption) DurationValue() time.Duration
- func (this *ArbitraryOption) IntValue() int
- func (this *ArbitraryOption) StringArray() []string
- func (this *ArbitraryOption) StringValue() string
- type Config
- func (this *Config) AddBoolOption(name string) (*ArbitraryOption, bool)
- func (this *Config) AddDurationOption(name string) (*ArbitraryOption, bool)
- func (this *Config) AddIntOption(name string) (*ArbitraryOption, bool)
- func (this *Config) AddOption(name string, t reflect.Type) (*ArbitraryOption, bool)
- func (this *Config) AddStringArrayOption(name string) (*ArbitraryOption, bool)
- func (this *Config) AddStringOption(name string) (*ArbitraryOption, bool)
- func (this *Config) AddToCommand(cmd *cobra.Command)
- func (this *Config) GetOption(name string) *ArbitraryOption
- type Extension
Constants ¶
This section is empty.
Variables ¶
View Source
var GracePeriod time.Duration
Functions ¶
func RegisterExtension ¶
func RegisterExtension(e Extension)
Types ¶
type ArbitraryOption ¶
type ArbitraryOption struct {
Name string
Description string
Default interface{}
Type reflect.Type
FlagSet *pflag.FlagSet
}
func (*ArbitraryOption) AddToCommand ¶
func (this *ArbitraryOption) AddToCommand(cmd *cobra.Command)
func (*ArbitraryOption) BoolValue ¶
func (this *ArbitraryOption) BoolValue() bool
func (*ArbitraryOption) Changed ¶
func (this *ArbitraryOption) Changed() bool
func (*ArbitraryOption) DurationValue ¶
func (this *ArbitraryOption) DurationValue() time.Duration
func (*ArbitraryOption) IntValue ¶
func (this *ArbitraryOption) IntValue() int
func (*ArbitraryOption) StringArray ¶
func (this *ArbitraryOption) StringArray() []string
func (*ArbitraryOption) StringValue ¶
func (this *ArbitraryOption) StringValue() string
type Config ¶
type Config struct {
LogLevel string
Controllers string
PluginDir string
Name string
Namespace string
OmitLease bool
DisableNamespaceRestriction bool
NamespaceRestriction bool
ServerPortHTTP int
CPUProfile string
ArbitraryOptions map[string]*ArbitraryOption
// contains filtered or unexported fields
}
func (*Config) AddBoolOption ¶
func (this *Config) AddBoolOption(name string) (*ArbitraryOption, bool)
func (*Config) AddDurationOption ¶
func (this *Config) AddDurationOption(name string) (*ArbitraryOption, bool)
func (*Config) AddIntOption ¶
func (this *Config) AddIntOption(name string) (*ArbitraryOption, bool)
func (*Config) AddStringArrayOption ¶
func (this *Config) AddStringArrayOption(name string) (*ArbitraryOption, bool)
func (*Config) AddStringOption ¶
func (this *Config) AddStringOption(name string) (*ArbitraryOption, bool)
func (*Config) AddToCommand ¶
func (*Config) GetOption ¶
func (this *Config) GetOption(name string) *ArbitraryOption
Click to show internal directories.
Click to hide internal directories.