Documentation
¶
Index ¶
Constants ¶
View Source
const ( DefaultFileName = "config" DefaultFolderName = ".kafta" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Configuration ¶
type Configuration struct {
DebugMode bool
AppName string
ActiveContext string
KaftaconfigFile string
KaftaData *KaftaConfig
}
func InitializeConfiguration ¶
func InitializeConfiguration(appName string) *Configuration
func (*Configuration) BindFlags ¶
func (c *Configuration) BindFlags(cmd *cobra.Command)
func (*Configuration) ConnectionConfig ¶
func (c *Configuration) ConnectionConfig() *ConnectionConfig
func (*Configuration) EnsureKaftaconfig ¶
func (c *Configuration) EnsureKaftaconfig()
func (*Configuration) GetContext ¶
func (c *Configuration) GetContext() *Context
func (*Configuration) UpdateConfig ¶
func (c *Configuration) UpdateConfig()
type ConnectionConfig ¶
type Context ¶
type Context struct {
SchemaRegistry string `yaml:"schema-registry"`
SchemaRegistryAuth struct {
Key string
Secret string
}
Ksql string `yaml:"ksql"`
BootstrapServers []string `yaml:"bootstrap-servers"`
KafkaVersion string `yaml:"kafka-version"`
UseSASL bool
UseTLS bool
TLS struct {
ClientCertFile string
ClientKeyFile string
CaCertFile string
}
SASL struct {
Algorithm string
Username string
Password string
}
}
func MakeContext ¶
func MakeContext() *Context
func (*Context) GetVersion ¶
func (c *Context) GetVersion() sarama.KafkaVersion
type KaftaConfig ¶
type KaftaConfig struct {
Contexts map[string]*Context `yaml:"contexts"`
CurrentContext string `yaml:"current-context"`
Connection ConnectionConfig `yaml:"config"`
// contains filtered or unexported fields
}
func LoadKaftaconfigOrDefault ¶
func LoadKaftaconfigOrDefault(configPath string) (*KaftaConfig, bool)
func (*KaftaConfig) ConfigFileName ¶
func (k *KaftaConfig) ConfigFileName() string
func (*KaftaConfig) ConfigPath ¶
func (k *KaftaConfig) ConfigPath() string
func (*KaftaConfig) Write ¶
func (k *KaftaConfig) Write() error
Click to show internal directories.
Click to hide internal directories.