command

package
v0.20.0-rc1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 13, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Init = &cobra.Command{
	Use:   "init",
	Short: "Generates a new config and then starts zookeeper.",
	Args:  cobra.ExactArgs(0),
	RunE: func(cmd *cobra.Command, args []string) error {
		return zkd.Init()
	},
}
View Source
var (
	Root = &cobra.Command{
		Use:   "zkctl",
		Short: "Initializes and controls zookeeper with Vitess-specific configuration.",
		PersistentPreRunE: func(cmd *cobra.Command, args []string) error {
			if err := servenv.CobraPreRunE(cmd, args); err != nil {
				return err
			}

			zkConfig := zkctl.MakeZkConfigFromString(zkCfg, uint32(myID))
			zkConfig.Extra = zkExtra
			zkd = zkctl.NewZkd(zkConfig)

			return nil
		},
		PersistentPostRun: func(cmd *cobra.Command, args []string) {
			logutil.Flush()
		},
	}
)
View Source
var Shutdown = &cobra.Command{
	Use:   "shutdown",
	Short: "Terminates a zookeeper server but keeps its data dir intact.",
	Args:  cobra.ExactArgs(0),
	RunE: func(cmd *cobra.Command, args []string) error {
		return zkd.Shutdown()
	},
}
View Source
var Start = &cobra.Command{
	Use:   "start",
	Short: "Runs an already initialized zookeeper server.",
	Args:  cobra.ExactArgs(0),
	RunE: func(cmd *cobra.Command, args []string) error {
		return zkd.Start()
	},
}
View Source
var Teardown = &cobra.Command{
	Use:   "teardown",
	Short: "Shuts down the zookeeper server and removes its data dir.",
	Args:  cobra.ExactArgs(0),
	RunE: func(cmd *cobra.Command, args []string) error {
		return zkd.Teardown()
	},
}

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL