featurebase/cmd/generate_config.go
Travis Turner 7a7bb0c928
Add kafka support to CLI (fbsql)
This commit adds the ability to provide a `--kafka-config` command line
argument referncing a toml file to configure kafka.
2023-03-06 13:31:15 -06:00

25 lines
644 B
Go

// Copyright 2022 Molecula Corp. (DBA FeatureBase).
// SPDX-License-Identifier: Apache-2.0
package cmd
import (
"github.com/spf13/cobra"
"github.com/featurebasedb/featurebase/v3/ctl"
"github.com/featurebasedb/featurebase/v3/logger"
)
var generateConf *ctl.GenerateConfigCommand
func newGenerateConfigCommand(logdest logger.Logger) *cobra.Command {
generateConf = ctl.NewGenerateConfigCommand(logdest)
confCmd := &cobra.Command{
Use: "generate-config",
Short: "Print the default configuration.",
Long: `generate-config prints the default configuration to stdout
`,
RunE: UsageErrorWrapper(generateConf),
}
return confCmd
}