Documentation ¶
Index ¶
- Constants
- Variables
- func GetEtcdStatus(caller *cobra.Command) (*interface{}, *tablewriter.Table, *cmderror.CmdError, ...)
- func NewEtcdCommand() *cobra.Command
- type EtcdCommand
- func (eCmd *EtcdCommand) AddFlags()
- func (eCmd *EtcdCommand) Init(cmd *cobra.Command, args []string) error
- func (eCmd *EtcdCommand) Print(cmd *cobra.Command, args []string) error
- func (eCmd *EtcdCommand) ResultPlainOutput() error
- func (eCmd *EtcdCommand) RunCommand(cmd *cobra.Command, args []string) error
Constants ¶
View Source
const ( STATUS_SUBURI = "/v2/stats/self" STATUS_METRIC_KEY = "state" VERSION_SUBURI = "/version" VARSION_METRIC_KEY = "etcdserver" )
Variables ¶
View Source
var (
EtcdStatusMap = map[string]string{
"StateLeader": "leader",
"StateFollower": "follower",
}
)
Functions ¶
func GetEtcdStatus ¶
func GetEtcdStatus(caller *cobra.Command) (*interface{}, *tablewriter.Table, *cmderror.CmdError, cobrautil.ClUSTER_HEALTH_STATUS)
func NewEtcdCommand ¶
Types ¶
type EtcdCommand ¶
type EtcdCommand struct { basecmd.FinalCurveCmd // contains filtered or unexported fields }
func NewStatusEtcdCommand ¶
func NewStatusEtcdCommand() *EtcdCommand
func (*EtcdCommand) AddFlags ¶
func (eCmd *EtcdCommand) AddFlags()
func (*EtcdCommand) ResultPlainOutput ¶
func (eCmd *EtcdCommand) ResultPlainOutput() error
func (*EtcdCommand) RunCommand ¶
func (eCmd *EtcdCommand) RunCommand(cmd *cobra.Command, args []string) error
Click to show internal directories.
Click to hide internal directories.