package command
import "go.etcd.io/etcd/etcdctl/v3/ctlv3/command"
Package command is a set of libraries for etcd v3 commands.
Index ¶
- func Argify(s string) []string
- func IsSerializable(option string) bool
- func NewAlarmCommand() *cobra.Command
- func NewAlarmDisarmCommand() *cobra.Command
- func NewAlarmListCommand() *cobra.Command
- func NewAuthCommand() *cobra.Command
- func NewAuthenticationGroup() *cobra.Group
- func NewCheckCommand() *cobra.Command
- func NewCheckDatascaleCommand() *cobra.Command
- func NewCheckPerfCommand() *cobra.Command
- func NewClusterMaintenanceGroup() *cobra.Group
- func NewCompactionCommand() *cobra.Command
- func NewCompletionCommand() *cobra.Command
- func NewConcurrencyGroup() *cobra.Group
- func NewDefragCommand() *cobra.Command
- func NewDelCommand() *cobra.Command
- func NewDowngradeCancelCommand() *cobra.Command
- func NewDowngradeCommand() *cobra.Command
- func NewDowngradeEnableCommand() *cobra.Command
- func NewDowngradeValidateCommand() *cobra.Command
- func NewElectCommand() *cobra.Command
- func NewEndpointCommand() *cobra.Command
- func NewGetCommand() *cobra.Command
- func NewKVGroup() *cobra.Group
- 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 NewMemberPromoteCommand() *cobra.Command
- func NewMemberRemoveCommand() *cobra.Command
- func NewMemberUpdateCommand() *cobra.Command
- func NewMoveLeaderCommand() *cobra.Command
- func NewOptionsCommand(rootCmd *cobra.Command) *cobra.Command
- func NewPrinter(printerType string, isHex bool) printer
- func NewPutCommand() *cobra.Command
- func NewRoleCommand() *cobra.Command
- func NewSnapshotCommand() *cobra.Command
- func NewSnapshotSaveCommand() *cobra.Command
- func NewTxnCommand() *cobra.Command
- func NewUserCommand() *cobra.Command
- func NewUtilityGroup() *cobra.Group
- func NewVersionCommand() *cobra.Command
- func NewWatchCommand() *cobra.Command
- func ParseCompare(line string) (*clientv3.Cmp, error)
- func SetHelpCmdGroup(rootCmd *cobra.Command)
- type GlobalFlags
- type HexMember
- type HexResponseHeader
- type ResponseOpJSON
- type ResponseOpResponseJSON
- type TxnResponseJSON
Functions ¶
func Argify ¶
func IsSerializable ¶
func NewAlarmCommand ¶
func NewAlarmCommand() *cobra.Command
NewAlarmCommand returns the cobra command for "alarm".
func NewAlarmDisarmCommand ¶
func NewAlarmDisarmCommand() *cobra.Command
func NewAlarmListCommand ¶
func NewAlarmListCommand() *cobra.Command
func NewAuthCommand ¶
func NewAuthCommand() *cobra.Command
NewAuthCommand returns the cobra command for "auth".
func NewAuthenticationGroup ¶
func NewAuthenticationGroup() *cobra.Group
func NewCheckCommand ¶
func NewCheckCommand() *cobra.Command
NewCheckCommand returns the cobra command for "check".
func NewCheckDatascaleCommand ¶
func NewCheckDatascaleCommand() *cobra.Command
NewCheckDatascaleCommand returns the cobra command for "check datascale".
func NewCheckPerfCommand ¶
func NewCheckPerfCommand() *cobra.Command
NewCheckPerfCommand returns the cobra command for "check perf".
func NewClusterMaintenanceGroup ¶
func NewClusterMaintenanceGroup() *cobra.Group
func NewCompactionCommand ¶
func NewCompactionCommand() *cobra.Command
NewCompactionCommand returns the cobra command for "compaction".
func NewCompletionCommand ¶
func NewCompletionCommand() *cobra.Command
func NewConcurrencyGroup ¶
func NewConcurrencyGroup() *cobra.Group
func NewDefragCommand ¶
func NewDefragCommand() *cobra.Command
NewDefragCommand returns the cobra command for "Defrag".
func NewDelCommand ¶
func NewDelCommand() *cobra.Command
NewDelCommand returns the cobra command for "del".
func NewDowngradeCancelCommand ¶
func NewDowngradeCancelCommand() *cobra.Command
NewDowngradeCancelCommand returns the cobra command for "downgrade cancel".
func NewDowngradeCommand ¶
func NewDowngradeCommand() *cobra.Command
NewDowngradeCommand returns the cobra command for "downgrade".
func NewDowngradeEnableCommand ¶
func NewDowngradeEnableCommand() *cobra.Command
NewDowngradeEnableCommand returns the cobra command for "downgrade enable".
func NewDowngradeValidateCommand ¶
func NewDowngradeValidateCommand() *cobra.Command
NewDowngradeValidateCommand returns the cobra command for "downgrade validate".
func NewElectCommand ¶
func NewElectCommand() *cobra.Command
NewElectCommand returns the cobra command for "elect".
func NewEndpointCommand ¶
func NewEndpointCommand() *cobra.Command
NewEndpointCommand returns the cobra command for "endpoint".
func NewGetCommand ¶
func NewGetCommand() *cobra.Command
NewGetCommand returns the cobra command for "get".
func NewKVGroup ¶
func NewKVGroup() *cobra.Group
func NewLeaseCommand ¶
func NewLeaseCommand() *cobra.Command
NewLeaseCommand returns the cobra command for "lease".
func NewLeaseGrantCommand ¶
func NewLeaseGrantCommand() *cobra.Command
NewLeaseGrantCommand returns the cobra command for "lease grant".
func NewLeaseKeepAliveCommand ¶
func NewLeaseKeepAliveCommand() *cobra.Command
NewLeaseKeepAliveCommand returns the cobra command for "lease keep-alive".
func NewLeaseListCommand ¶
func NewLeaseListCommand() *cobra.Command
NewLeaseListCommand returns the cobra command for "lease list".
func NewLeaseRevokeCommand ¶
func NewLeaseRevokeCommand() *cobra.Command
NewLeaseRevokeCommand returns the cobra command for "lease revoke".
func NewLeaseTimeToLiveCommand ¶
func NewLeaseTimeToLiveCommand() *cobra.Command
NewLeaseTimeToLiveCommand returns the cobra command for "lease timetolive".
func NewLockCommand ¶
func NewLockCommand() *cobra.Command
NewLockCommand returns the cobra command for "lock".
func NewMakeMirrorCommand ¶
func NewMakeMirrorCommand() *cobra.Command
NewMakeMirrorCommand returns the cobra command for "makeMirror".
func NewMemberAddCommand ¶
func NewMemberAddCommand() *cobra.Command
NewMemberAddCommand returns the cobra command for "member add".
func NewMemberCommand ¶
func NewMemberCommand() *cobra.Command
NewMemberCommand returns the cobra command for "member".
func NewMemberListCommand ¶
func NewMemberListCommand() *cobra.Command
NewMemberListCommand returns the cobra command for "member list".
func NewMemberPromoteCommand ¶
func NewMemberPromoteCommand() *cobra.Command
NewMemberPromoteCommand returns the cobra command for "member promote".
func NewMemberRemoveCommand ¶
func NewMemberRemoveCommand() *cobra.Command
NewMemberRemoveCommand returns the cobra command for "member remove".
func NewMemberUpdateCommand ¶
func NewMemberUpdateCommand() *cobra.Command
NewMemberUpdateCommand returns the cobra command for "member update".
func NewMoveLeaderCommand ¶
func NewMoveLeaderCommand() *cobra.Command
NewMoveLeaderCommand returns the cobra command for "move-leader".
func NewOptionsCommand ¶
func NewOptionsCommand(rootCmd *cobra.Command) *cobra.Command
func NewPrinter ¶
func NewPutCommand ¶
func NewPutCommand() *cobra.Command
NewPutCommand returns the cobra command for "put".
func NewRoleCommand ¶
func NewRoleCommand() *cobra.Command
NewRoleCommand returns the cobra command for "role".
func NewSnapshotCommand ¶
func NewSnapshotCommand() *cobra.Command
NewSnapshotCommand returns the cobra command for "snapshot".
func NewSnapshotSaveCommand ¶
func NewSnapshotSaveCommand() *cobra.Command
func NewTxnCommand ¶
func NewTxnCommand() *cobra.Command
NewTxnCommand returns the cobra command for "txn".
func NewUserCommand ¶
func NewUserCommand() *cobra.Command
NewUserCommand returns the cobra command for "user".
func NewUtilityGroup ¶
func NewUtilityGroup() *cobra.Group
func NewVersionCommand ¶
func NewVersionCommand() *cobra.Command
NewVersionCommand prints out the version of etcd.
func NewWatchCommand ¶
func NewWatchCommand() *cobra.Command
NewWatchCommand returns the cobra command for "watch".
func ParseCompare ¶
func SetHelpCmdGroup ¶
func SetHelpCmdGroup(rootCmd *cobra.Command)
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
MaxCallSendMsgSize int
MaxCallRecvMsgSize int
DNSClusterServiceName string
TLS transport.TLSInfo
OutputFormat string
IsHex bool
User string
Password string
Token string
Debug bool
}
GlobalFlags are flags that defined globally and are inherited to all sub-commands.
type HexMember ¶
type HexMember pb.Member
func (*HexMember) MarshalJSON ¶
type HexResponseHeader ¶
type HexResponseHeader pb.ResponseHeader
func (*HexResponseHeader) MarshalJSON ¶
func (h *HexResponseHeader) MarshalJSON() ([]byte, error)
type ResponseOpJSON ¶
type ResponseOpJSON struct {
Response ResponseOpResponseJSON `json:"Response"`
}
type ResponseOpResponseJSON ¶
type ResponseOpResponseJSON struct {
ResponseRange *pb.RangeResponse `json:"response_range,omitempty"`
ResponsePut *pb.PutResponse `json:"response_put,omitempty"`
ResponseDeleteRange *pb.DeleteRangeResponse `json:"response_delete_range,omitempty"`
ResponseTxn *TxnResponseJSON `json:"response_txn,omitempty"`
}
type TxnResponseJSON ¶
type TxnResponseJSON struct {
Header *pb.ResponseHeader `json:"header,omitempty"`
Succeeded bool `json:"succeeded,omitempty"`
Responses []ResponseOpJSON `json:"responses,omitempty"`
}
func TxnResponseJSONFromProto ¶
func TxnResponseJSONFromProto(protoResponse *pb.TxnResponse) TxnResponseJSON
func (*TxnResponseJSON) ToProto ¶
func (t *TxnResponseJSON) ToProto() *pb.TxnResponse
Source Files ¶
alarm_command.go auth_command.go check.go compaction_command.go completion_command.go defrag_command.go del_command.go doc.go downgrade_command.go elect_command.go ep_command.go get_command.go global.go groups.go help_command.go lease_command.go lock_command.go make_mirror_command.go member_command.go move_leader_command.go options_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
- Version
- v3.7.1 (latest)
- Published
- Jul 23, 2026
- Platform
- linux/amd64
- Imports
- 50 packages
- Last checked
- 13 hours ago –
Tools for package owners.