cmd

package
v0.0.0-...-8586071 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2020 License: Apache-2.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// FlagLogLevel is the name of log-level flag.
	FlagLogLevel = "log-level"
	// FlagLogFile is the name of log-file flag.
	FlagLogFile = "log-file"
	// FlagLogFormat is the name of log-format flag.
	FlagLogFormat = "log-format"
	// FlagStatusAddr is the name of status-addr flag.
	FlagStatusAddr = "status-addr"
	// FlagSlowLogFile is the name of slow-log-file flag.
	FlagSlowLogFile = "slow-log-file"
)

Variables

This section is empty.

Functions

func AddFlags

func AddFlags(cmd *cobra.Command)

AddFlags adds flags to the given cmd.

func GetDefaultContext

func GetDefaultContext() context.Context

GetDefaultContext returns the default context for command line usage.

func HasLogFile

func HasLogFile() bool

HasLogFile returns whether we set a log file.

func Init

func Init(cmd *cobra.Command) (err error)

Init initializes BR cli.

func NewBackupCommand

func NewBackupCommand() *cobra.Command

NewBackupCommand return a full backup subcommand.

func NewDebugCommand

func NewDebugCommand() *cobra.Command

NewDebugCommand return a debug subcommand.

func NewRestoreCommand

func NewRestoreCommand() *cobra.Command

NewRestoreCommand returns a restore subcommand.

func SetDefaultContext

func SetDefaultContext(ctx context.Context)

SetDefaultContext sets the default context for command line usage.

Types

This section is empty.

Jump to

Keyboard shortcuts

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