Documentation
¶
Overview ¶
Package cmd contains the root command and CLI entry point.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DryRun bool
DryRun is the global dry-run flag shared across subcommands.
View Source
var OutputFormat string
OutputFormat is the global output format flag ("text" or "json").
View Source
var RootCmd = &cobra.Command{ Use: "kkon", Short: "CLI to manage Kafka connector fast and easy!", Long: `kkon - cli tool for working with Kafka Connect. Manage, create, and list predefined connector in seconds!`, PersistentPreRun: func(cmd *cobra.Command, args []string) { config.SetDryRun(DryRun) if cmd.Parent() != nil && cmd.Parent().Use == "config" { return } cfg, err := util.LoadConfig() if err != nil || cfg.KafkaConnect.URL == "" { color.Yellow("No Kafka Connect URL configured.") color.Cyan("Running initial configuration...\n") if err := config.ConfigureCmd.RunE(cmd, args); err != nil { color.Red("Configuration failed: %v\n", err) os.Exit(1) } } }, }
RootCmd represents the base command when called without any subcommands.
Functions ¶
func Execute ¶
func Execute()
Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the RootCmd.
func SetVersionInfo ¶
func SetVersionInfo(version, commit, date string)
SetVersionInfo records build metadata and enables `gk --version`. It is called from main before Execute.
Types ¶
This section is empty.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package config provides CLI commands for managing kkon configuration.
|
Package config provides CLI commands for managing kkon configuration. |
|
Package connector provides CLI commands for managing Kafka Connect connectors.
|
Package connector provides CLI commands for managing Kafka Connect connectors. |
|
Package task provides CLI commands for managing Kafka Connect tasks.
|
Package task provides CLI commands for managing Kafka Connect tasks. |
Click to show internal directories.
Click to hide internal directories.