Versions in this module Expand all Collapse all v0 v0.1.0 Dec 31, 2019 Changes in this version + const CheckFailed + const CheckPassed + const InitFailed + const InitPassed + const ItemErrEmpty + const ItemErrOperation + const ItemErrScript + const ItemHelperEmpty + const ItemHelperOperation + const ItemHelperScript + func CheckCPUExecutor(ncAction *NodeCheckAction, wg *sync.WaitGroup) + func CheckDistributionExecutor(ncAction *NodeCheckAction, wg *sync.WaitGroup) + func CheckDockerExecutor(ncAction *NodeCheckAction, wg *sync.WaitGroup) + func CheckKernelExecutor(ncAction *NodeCheckAction, wg *sync.WaitGroup) + func CheckMemoryExecutor(ncAction *NodeCheckAction, wg *sync.WaitGroup) + func CheckPortOccupiedExecutor(ncAction *NodeCheckAction, wg *sync.WaitGroup) + func CheckRootDiskExecutor(ncAction *NodeCheckAction, wg *sync.WaitGroup) + func CheckSysManagerExecutor(ncAction *NodeCheckAction, wg *sync.WaitGroup) + func CheckSysPrefExecutor(ncAction *NodeCheckAction, wg *sync.WaitGroup) + func ExecuteAction(act Action, wg *sync.WaitGroup) + func GenActionLogFilePath(basePath, actionName string, nodeName string) string + func GenActionName(actionType Type) string + func InitAsyncExecutor(item it.ItemEnum, ncAction *NodeInitAction, wg *sync.WaitGroup) + func RegisterExecutor(actionType Type, exec Executor) error + func UpdateInitItems(initAction *NodeInitAction, report *NodeInitItem) + type Action interface + GetCreationTimestamp func() time.Time + GetErr func() *pb.Error + GetExecuteLogBuffer func() io.ReadWriter + GetLogFilePath func() string + GetName func() string + GetNode func() *pb.Node + GetStatus func() Status + GetType func() Type + SetErr func(*pb.Error) + SetExecuteLogBuffer func(io.ReadWriter) + SetLogFilePath func(string) + SetStatus func(Status) + func NewConnectivityCheckAction(cfg *ConnectivityCheckActionConfig) (Action, error) + func NewDeployEtcdAction(cfg *DeployEtcdActionConfig) (Action, error) + func NewDeployWorkerAction(config *DeployWorkerActionConfig) (Action, error) + func NewFetchKubeConfigAction(cfg *FetchKubeConfigActionConfig) (Action, error) + func NewInitMasterAction(cfg *InitMasterActionConfig) (Action, error) + func NewJoinMasterAction(cfg *JoinMasterActionConfig) (Action, error) + func NewNodeCheckAction(cfg *NodeCheckActionConfig) (Action, error) + func NewNodeInitAction(cfg *NodeInitActionConfig) (Action, error) + func NewTestConnectionAction(cfg *TestConnectionActionConfig) (Action, error) + type Base struct + ActionType Type + CreationTimestamp time.Time + Err *pb.Error + ExecuteLogBuffer io.ReadWriter + LogFilePath string + Name string + Node *pb.Node + Status Status + func (b *Base) GetCreationTimestamp() time.Time + func (b *Base) GetErr() *pb.Error + func (b *Base) GetExecuteLogBuffer() io.ReadWriter + func (b *Base) GetLogFilePath() string + func (b *Base) GetName() string + func (b *Base) GetNode() *pb.Node + func (b *Base) GetStatus() Status + func (b *Base) GetType() Type + func (b *Base) SetErr(err *pb.Error) + func (b *Base) SetExecuteLogBuffer(buf io.ReadWriter) + func (b *Base) SetLogFilePath(path string) + func (b *Base) SetStatus(status Status) + type ConnectivityCheckAction struct + CheckItems []ConnectivityCheckItem + DestinationNode *pb.Node + SourceNode *pb.Node + type ConnectivityCheckActionConfig struct + ConnectivityCheckItems []ConnectivityCheckItem + DestinationNode *pb.Node + LogFileBasePath string + SourceNode *pb.Node + type ConnectivityCheckItem struct + CheckResult *pb.ItemCheckResult + Port uint16 + Protocol consts.Protocol + type DeployEtcdAction struct + CACrt *x509.Certificate + CAKey crypto.Signer + ClusterNodes []*pb.Node + type DeployEtcdActionConfig struct + CaCrt *x509.Certificate + CaKey crypto.Signer + ClusterNodes []*pb.Node + LogFileBasePath string + Node *pb.Node + type DeployWorkerAction struct + type DeployWorkerActionConfig struct + ClusterConfig *pb.ClusterConfig + LogFileBasePath string + MasterNodes []*pb.Node + NodeCfg *pb.NodeDeployConfig + type Executor interface + Execute func(act Action) *pb.Error + func NewExecutor(actionType Type) (Executor, error) + type FetchKubeConfigAction struct + KubeConfig []byte + type FetchKubeConfigActionConfig struct + LogFileBasePath string + Node *pb.Node + type InitMasterAction struct + CertKey string + ClusterConfig *pb.ClusterConfig + EtcdNodes []*pb.Node + MasterNodes []*pb.Node + type InitMasterActionConfig struct + CertKey string + ClusterConfig *pb.ClusterConfig + EtcdNodes []*pb.Node + LogFileBasePath string + MasterNodes []*pb.Node + Node *pb.Node + type ItemStatus string + const ItemDoing + const ItemDone + const ItemFailed + const ItemPending + type JoinMasterAction struct + CertKey string + ClusterConfig *pb.ClusterConfig + MasterNodes []*pb.Node + type JoinMasterActionConfig struct + CertKey string + ClusterConfig *pb.ClusterConfig + LogFileBasePath string + MasterNodes []*pb.Node + Node *pb.Node + type NodeCheckAction struct + CheckItems []*NodeCheckItem + NodeCheckConfig *pb.NodeCheckConfig + type NodeCheckActionConfig struct + LogFileBasePath string + NodeCheckConfig *pb.NodeCheckConfig + type NodeCheckItem struct + Description string + Err *pb.Error + Name string + Status ItemStatus + func ExecuteCheckScript(item check.ItemEnum, config *pb.NodeCheckConfig, ...) (string, *NodeCheckItem, error) + type NodeInitAction struct + ClusterConfig *pb.ClusterConfig + InitItems []*NodeInitItem + NodeInitConfig *pb.NodeDeployConfig + NodesConfig []*pb.NodeDeployConfig + type NodeInitActionConfig struct + ClusterConfig *pb.ClusterConfig + LogFileBasePath string + NodeInitConfig *pb.NodeDeployConfig + NodesConfig []*pb.NodeDeployConfig + type NodeInitItem struct + Description string + Err *pb.Error + Name string + Status ItemStatus + func ExecuteInitScript(item it.ItemEnum, action *NodeInitAction, initItemReport *NodeInitItem) (string, *NodeInitItem, error) + type Status string + const ActionDoing + const ActionDone + const ActionFailed + const ActionPending + type TestConnectionAction struct + type TestConnectionActionConfig struct + LogFileBasePath string + Node *pb.Node + type Type string + const ActionTypeConnectivityCheck + const ActionTypeDeployEtcd + const ActionTypeDeployWorker + const ActionTypeFetchKubeConfig + const ActionTypeInitMaster + const ActionTypeJoinMaster + const ActionTypeNodeCheck + const ActionTypeNodeInit + const ActionTypeTestConnection