kcli

package
v0.0.0-...-df7806a Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RootCmd = &cobra.Command{
	Use:   "keeper [keeper]",
	Short: "microservice keeper",
	Long:  "use -h or --help to see how to use",
	Run: func(cmd *cobra.Command, args []string) {
		fmt.Println("This is Keeper")
	},
}

Functions

func InitCliCmd

func InitCliCmd(kPtr ICommand)

func InitRQuitCmd

func InitRQuitCmd(keeper ICommand)

func InitReloadCmd

func InitReloadCmd(keeper ICommand)

func InitStartCmd

func InitStartCmd(keeper ICommand)

func InitStopCmd

func InitStopCmd(keeper ICommand)

func InitVersionCmd

func InitVersionCmd(keeper ICommand)

Types

type ICommand

type ICommand interface {
	SetRootCommand(c *cobra.Command)
	AddCommand(cmds ...*cobra.Command)
	Execute() error
	IKStartCmd
	IkStopCmd
	IkVersionCmd
}

Keeper实现本接口的方法在ki_cli.go中

type IKStartCmd

type IKStartCmd interface {
	SetAppsToOperate(names []string)
	SetCurrentExecutor(execName string)
	Config() *gcfg.Config
	InitLogSetting(config *gcfg.Config) error
	ParseConfig(config string)
	ParseEnv(env string)
	ParseDebug(debug bool)
	ParseDaemon(daemon bool)
	ParsePidFilePath(pidPath string)
	CheckKeeperForStart()
	RunKeeper()
}

type IkStopCmd

type IkStopCmd interface {
	StopKeeper(sig string)
}

type IkVersionCmd

type IkVersionCmd interface {
	Version()
}

Jump to

Keyboard shortcuts

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