Documentation ¶
Overview ¶
Package command is a set of libraries for etcd v3 commands.
Index ¶
- Constants
- func ExitWithError(code int, err error)
- func NewAlarmCommand() *cobra.Command
- func NewAlarmDisarmCommand() *cobra.Command
- func NewAlarmListCommand() *cobra.Command
- func NewAuthCommand() *cobra.Command
- func NewCheckCommand() *cobra.Command
- func NewCheckPerfCommand() *cobra.Command
- func NewCompactionCommand() *cobra.Command
- func NewDefragCommand() *cobra.Command
- func NewDelCommand() *cobra.Command
- func NewElectCommand() *cobra.Command
- func NewEndpointCommand() *cobra.Command
- func NewGetCommand() *cobra.Command
- func NewLeaseCommand() *cobra.Command
- func NewLeaseGrantCommand() *cobra.Command
- func NewLeaseKeepAliveCommand() *cobra.Command
- func NewLeaseListCommand() *cobra.Command
- func NewLeaseRevokeCommand() *cobra.Command
- func NewLeaseTimeToLiveCommand() *cobra.Command
- func NewLockCommand() *cobra.Command
- func NewMakeMirrorCommand() *cobra.Command
- func NewMemberAddCommand() *cobra.Command
- func NewMemberCommand() *cobra.Command
- func NewMemberListCommand() *cobra.Command
- func NewMemberRemoveCommand() *cobra.Command
- func NewMemberUpdateCommand() *cobra.Command
- func NewMigrateCommand() *cobra.Command
- func NewMoveLeaderCommand() *cobra.Command
- func NewPrinter(printerType string, isHex bool) printer
- func NewPutCommand() *cobra.Command
- func NewRoleCommand() *cobra.Command
- func NewSnapshotCommand() *cobra.Command
- func NewSnapshotRestoreCommand() *cobra.Command
- func NewSnapshotSaveCommand() *cobra.Command
- func NewTxnCommand() *cobra.Command
- func NewUserCommand() *cobra.Command
- func NewVersionCommand() *cobra.Command
- func NewWatchCommand() *cobra.Command
- type GlobalFlags
Constants ¶
const ( // http://tldp.org/LDP/abs/html/exitcodes.html ExitSuccess = iota ExitError ExitBadConnection ExitInvalidInput // for txn, watch command ExitBadFeature // provided a valid flag with an unsupported value ExitInterrupted ExitIO ExitBadArgs = 128 )
Variables ¶
This section is empty.
Functions ¶
func ExitWithError ¶
func NewAlarmCommand ¶
NewAlarmCommand returns the cobra command for "alarm".
func NewAlarmDisarmCommand ¶
func NewAlarmListCommand ¶
func NewAuthCommand ¶
NewAuthCommand returns the cobra command for "auth".
func NewCheckCommand ¶
NewCheckCommand returns the cobra command for "check".
func NewCheckPerfCommand ¶
NewCheckPerfCommand returns the cobra command for "check perf".
func NewCompactionCommand ¶
NewCompactionCommand returns the cobra command for "compaction".
func NewDefragCommand ¶
NewDefragCommand returns the cobra command for "Defrag".
func NewDelCommand ¶
NewDelCommand returns the cobra command for "del".
func NewElectCommand ¶
NewElectCommand returns the cobra command for "elect".
func NewEndpointCommand ¶
NewEndpointCommand returns the cobra command for "endpoint".
func NewGetCommand ¶
NewGetCommand returns the cobra command for "get".
func NewLeaseCommand ¶
NewLeaseCommand returns the cobra command for "lease".
func NewLeaseGrantCommand ¶
NewLeaseGrantCommand returns the cobra command for "lease grant".
func NewLeaseKeepAliveCommand ¶
NewLeaseKeepAliveCommand returns the cobra command for "lease keep-alive".
func NewLeaseListCommand ¶
NewLeaseListCommand returns the cobra command for "lease list".
func NewLeaseRevokeCommand ¶
NewLeaseRevokeCommand returns the cobra command for "lease revoke".
func NewLeaseTimeToLiveCommand ¶
NewLeaseTimeToLiveCommand returns the cobra command for "lease timetolive".
func NewLockCommand ¶
NewLockCommand returns the cobra command for "lock".
func NewMakeMirrorCommand ¶
NewMakeMirrorCommand returns the cobra command for "makeMirror".
func NewMemberAddCommand ¶
NewMemberAddCommand returns the cobra command for "member add".
func NewMemberCommand ¶
NewMemberCommand returns the cobra command for "member".
func NewMemberListCommand ¶
NewMemberListCommand returns the cobra command for "member list".
func NewMemberRemoveCommand ¶
NewMemberRemoveCommand returns the cobra command for "member remove".
func NewMemberUpdateCommand ¶
NewMemberUpdateCommand returns the cobra command for "member update".
func NewMigrateCommand ¶
NewMigrateCommand returns the cobra command for "migrate".
func NewMoveLeaderCommand ¶
NewMoveLeaderCommand returns the cobra command for "move-leader".
func NewPrinter ¶
func NewPutCommand ¶
NewPutCommand returns the cobra command for "put".
func NewRoleCommand ¶
NewRoleCommand returns the cobra command for "role".
func NewSnapshotCommand ¶
NewSnapshotCommand returns the cobra command for "snapshot".
func NewSnapshotSaveCommand ¶
func NewTxnCommand ¶
NewTxnCommand returns the cobra command for "txn".
func NewUserCommand ¶
NewUserCommand returns the cobra command for "user".
func NewVersionCommand ¶
NewVersionCommand prints out the version of etcd.
func NewWatchCommand ¶
NewWatchCommand returns the cobra command for "watch".
Types ¶
type GlobalFlags ¶
type GlobalFlags struct { Insecure bool InsecureSkipVerify bool InsecureDiscovery bool Endpoints []string DialTimeout time.Duration CommandTimeOut time.Duration KeepAliveTime time.Duration KeepAliveTimeout time.Duration TLS transport.TLSInfo OutputFormat string IsHex bool User string Debug bool }
GlobalFlags are flags that defined globally and are inherited to all sub-commands.
Source Files ¶
- alarm_command.go
- auth_command.go
- check.go
- compaction_command.go
- defrag_command.go
- del_command.go
- doc.go
- elect_command.go
- ep_command.go
- error.go
- get_command.go
- global.go
- lease_command.go
- lock_command.go
- make_mirror_command.go
- member_command.go
- migrate_command.go
- move_leader_command.go
- printer.go
- printer_fields.go
- printer_json.go
- printer_protobuf.go
- printer_simple.go
- printer_table.go
- put_command.go
- role_command.go
- snapshot_command.go
- txn_command.go
- user_command.go
- util.go
- version_command.go
- watch_command.go