Documentation
¶
Index ¶
- func AddBootstrapFlags(flags *flag.FlagSet)
- func BootstrapConfig() error
- type ChannelTypeMapping
- type Config
- type NamedValue
- type Profile
- type SinkMapping
- type TestConfig
- func (t TestConfig) ChannelTypeMappings() []ChannelTypeMapping
- func (t TestConfig) ConfigFile() string
- func (t TestConfig) ContextSharing() bool
- func (t TestConfig) LookupPluginsInPath() bool
- func (t TestConfig) PluginsDir() string
- func (t TestConfig) Profile(profile string) Profile
- func (t TestConfig) SinkMappings() []SinkMapping
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddBootstrapFlags ¶
Add bootstrap flags use in a separate bootstrap proceeds
func BootstrapConfig ¶
func BootstrapConfig() error
BootstrapConfig reads in config file and bootstrap options if set.
Types ¶
type ChannelTypeMapping ¶ added in v0.17.0
type ChannelTypeMapping struct {
// Alias is the mapping alias (like "kafka")
Alias string
// Kind is the name for the mapped resource kind (like "KafkaChannel")
Kind string
// Group is the API group for the mapped resource kind (like "messaging.knative.dev")
Group string
// Version is the API version for the mapped resource kind (like "v1alpha1")
Version string
}
ChannelTypeMapping is the struct of ChannelType alias config in kn config
type Config ¶
type Config interface {
// ContextSharing represents feature flag enabling context sharing
ContextSharing() bool
// ConfigFile returns the location of the configuration file
ConfigFile() string
// PluginsDir returns the path to the directory containing plugins
PluginsDir() string
// LookupPluginsInPath returns true if plugins should be also looked up
// in the execution path
LookupPluginsInPath() bool
// SinkMappings returns additional mappings for sink prefixes to resources
SinkMappings() []SinkMapping
// ChannelTypeMappings returns additional mappings for channel type aliases
ChannelTypeMappings() []ChannelTypeMapping
// Profile returns a configured profile with this name or nil of no such profile is configured
Profile(profile string) Profile
}
var GlobalConfig Config = &globalConfig
GlobalConfig is the global configuration available for every sub-command
type NamedValue ¶ added in v0.40.0
NamedValue is the struct of name and values in the Profile struct
type Profile ¶ added in v0.40.0
type Profile struct {
Annotations []NamedValue `yaml:"annotations"`
Labels []NamedValue `yaml:"labels"`
}
Profile is the struct of profile config in kn config
type SinkMapping ¶
type SinkMapping struct {
// Prefix is the mapping prefix (like "svc")
Prefix string
// Resource is the name for the mapped resource (like "services", mind the plural)
Resource string
// Group is the api group for the mapped resource (like "core")
Group string
// Version is the api version for the mapped resource (like "v1")
Version string
}
SinkMappings is the struct of sink prefix config in kn config
type TestConfig ¶
type TestConfig struct {
TestContextSharing bool
TestPluginsDir string
TestConfigFile string
TestLookupPluginsInPath bool
TestSinkMappings []SinkMapping
TestChannelTypeMappings []ChannelTypeMapping
TestProfiles map[string]Profile
}
Implementation of Config useful for testing purposes Set an instance of this for config.GlobalConfig to mock your own configuration setup
func (TestConfig) ChannelTypeMappings ¶ added in v0.17.0
func (t TestConfig) ChannelTypeMappings() []ChannelTypeMapping
func (TestConfig) ConfigFile ¶
func (t TestConfig) ConfigFile() string
func (TestConfig) ContextSharing ¶ added in v0.39.0
func (t TestConfig) ContextSharing() bool
func (TestConfig) LookupPluginsInPath ¶
func (t TestConfig) LookupPluginsInPath() bool
func (TestConfig) PluginsDir ¶
func (t TestConfig) PluginsDir() string
func (TestConfig) Profile ¶ added in v0.40.0
func (t TestConfig) Profile(profile string) Profile
func (TestConfig) SinkMappings ¶
func (t TestConfig) SinkMappings() []SinkMapping
Click to show internal directories.
Click to hide internal directories.