cmd

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2023 License: BSD-2-Clause Imports: 49 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// InjectedCmds is populated with the command to be injected into root.
	// TT-EE.
	InjectedCmds []*cobra.Command
)

Functions

func Execute

func Execute()

Execute root command. If received error is of an ArgError type, usage help is printed.

func GetCmdCtxPtr

func GetCmdCtxPtr() *cmdcontext.CmdCtx

GetCmdCtxPtr returns a pointer to cmdCtx, which can be used to create injected commands. TT-EE.

func GetModulesInfoPtr

func GetModulesInfoPtr() *modules.ModulesInfo

GetModulesInfoPtr returns a pointer to modulesInfo, which can be used to create injected commands. TT-EE.

func InitRoot

func InitRoot()

InitRoot initializes global flags, configures CLI, configure external modules, collects information about available modules and configure `help` module.

func InternalUninstallModule added in v0.3.0

func InternalUninstallModule(cmdCtx *cmdcontext.CmdCtx, args []string) error

InternalUninstallModule is a default uninstall module.

func NewBinariesCmd added in v1.0.0

func NewBinariesCmd() *cobra.Command

NewBinariesCmd creates binaries command.

func NewBuildCmd

func NewBuildCmd() *cobra.Command

NewBuildCmd builds an application.

func NewCartridgeCmd

func NewCartridgeCmd() *cobra.Command

NewCartridgeCmd chains commands from cartridge-cli to our corba tree.

func NewCatCmd

func NewCatCmd() *cobra.Command

NewCatCmd creates a new cat command.

func NewCfgCmd added in v0.4.0

func NewCfgCmd() *cobra.Command

NewCfgCmd creates a new cfg command.

func NewCheckCmd

func NewCheckCmd() *cobra.Command

NewCheckCmd creates a new check command.

func NewCleanCmd

func NewCleanCmd() *cobra.Command

NewCleanCmd creates clean command.

func NewClusterCmd added in v1.3.0

func NewClusterCmd() *cobra.Command

func NewCmdRoot

func NewCmdRoot() *cobra.Command

NewCmdRoot creates a new root command.

func NewCompletionCmd

func NewCompletionCmd() *cobra.Command

NewCompletionCmd creates a new completion command.

func NewConnectCmd

func NewConnectCmd() *cobra.Command

NewConnectCmd creates connect command.

func NewCoredumpCmd

func NewCoredumpCmd() *cobra.Command

NewCoredumpCmd creates coredump command.

func NewCreateCmd

func NewCreateCmd() *cobra.Command

NewCreateCmd creates an application from a template.

func NewDaemonCmd

func NewDaemonCmd() *cobra.Command

NewDaemonCmd creates daemon command.

func NewDumpCmd added in v0.4.0

func NewDumpCmd() *cobra.Command

NewDumpCmd creates a new dump command.

func NewInitCmd

func NewInitCmd() *cobra.Command

NewInitCmd analyses current working directory and generates tt.yaml for existing application found in working dir. It there is no app in current directory, default version of tt.yaml will be generated.

func NewInstallCmd

func NewInstallCmd() *cobra.Command

NewInstallCmd creates install command.

func NewInstancesCmd added in v1.0.0

func NewInstancesCmd() *cobra.Command

NewInstancesCmd creates instances command.

func NewLogrotateCmd

func NewLogrotateCmd() *cobra.Command

NewLogrotateCmd creates logrotate command.

func NewPackCmd

func NewPackCmd() *cobra.Command

func NewPlayCmd

func NewPlayCmd() *cobra.Command

NewPlayCmd creates a new play command.

func NewRestartCmd

func NewRestartCmd() *cobra.Command

NewRestartCmd creates start command.

func NewRocksCmd

func NewRocksCmd() *cobra.Command

NewRocksCmd creates rocks command.

func NewRunCmd

func NewRunCmd() *cobra.Command

NewRunCmd creates run command.

func NewSearchCmd

func NewSearchCmd() *cobra.Command

NewSearchCmd creates search command.

func NewStartCmd

func NewStartCmd() *cobra.Command

NewStartCmd creates start command.

func NewStatusCmd

func NewStatusCmd() *cobra.Command

NewStatusCmd creates status command.

func NewStopCmd

func NewStopCmd() *cobra.Command

NewStopCmd creates stop command.

func NewUninstallCmd added in v0.3.0

func NewUninstallCmd() *cobra.Command

NewUninstallCmd creates uninstall command.

func NewVersionCmd

func NewVersionCmd() *cobra.Command

NewVersionCmd creates a new version command.

func RootShellCompletionCommands

func RootShellCompletionCommands(cmd *cobra.Command, args []string,
	toComplete string) ([]string, cobra.ShellCompDirective)

RootShellCompletionCommands returns a list of external commands for autocomplete.

Types

type DefaultHelpFunc

type DefaultHelpFunc func(*cobra.Command, []string)

DefaultHelpFunc is a type of the standard built-in cobra implementation of the help function.

type LogHandler added in v0.4.0

type LogHandler struct{}

LogHandler is a custom log handler implementation used to print formatted error and warning log messages.

func (*LogHandler) HandleLog added in v0.4.0

func (handler *LogHandler) HandleLog(logEntry *log.Entry) error

HandleLog performs log handling in accordance with log entry level.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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