Documentation ¶
Index ¶
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 { // 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 }
var GlobalConfig Config = &globalConfig
GlobalConfig is the global configuration available for every sub-command
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 { TestPluginsDir string TestConfigFile string TestLookupPluginsInPath bool TestSinkMappings []SinkMapping TestChannelTypeMappings []ChannelTypeMapping }
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) LookupPluginsInPath ¶
func (t TestConfig) LookupPluginsInPath() bool
func (TestConfig) PluginsDir ¶
func (t TestConfig) PluginsDir() string
func (TestConfig) SinkMappings ¶
func (t TestConfig) SinkMappings() []SinkMapping
Click to show internal directories.
Click to hide internal directories.