Documentation ¶
Index ¶
- Constants
- func CheckCPUNums(cpuCore string, desiredCPUCore float64) error
- func CheckDockerVersion(dockerVersion string, standardVersion string, comparedSymbol string) error
- func CheckKernelVersion(kernelVersion string, standardVersion string, checkStandard string) error
- func CheckMemoryCapacity(comparedMemory string, desiredMemory float64) error
- func CheckPortOccupied(portSet string) (string, error)
- func CheckRootDiskVolume(rootDiskVolume string, desiredDiskVolume float64) error
- func CheckSystemDistribution(disName string) error
- func CheckSystemManager(systemManager string, desireSysManager string) error
- type CheckAction
- type CheckCPUOperation
- type CheckDistributionOperation
- type CheckDockerOperation
- type CheckKernelOperation
- type CheckMemoryOperation
- type CheckOperations
- type CheckPortOccupiedOperation
- type CheckRootDiskOperation
- type CheckSysPrefOperation
- type CheckSystemManagerOperation
- type ItemEnum
- type OperationsGenerator
Constants ¶
View Source
const ( DistributionCentos string = "centos" DistributionUbuntu string = "ubuntu" DistributionRHEL string = "rhel" )
Variables ¶
This section is empty.
Functions ¶
func CheckCPUNums ¶
check if CPU numbers larger or equal than desired cores
func CheckDockerVersion ¶
check docker version if version larger or equal than standard version
func CheckKernelVersion ¶
check if kernel version larger or equal than standard version
func CheckMemoryCapacity ¶
check if memory capacity satisfied with minimal requirement
func CheckPortOccupied ¶
check if port is occupied
func CheckRootDiskVolume ¶
check if root disk volume satisfied with desired disk volume
func CheckSystemDistribution ¶
check if system distribution can be supported
func CheckSystemManager ¶
check is system manager is systemd
Types ¶
type CheckAction ¶
type CheckAction interface { GetOperations(config *pb.NodeCheckConfig) (operation.Operation, error) CloseSSH() // contains filtered or unexported methods }
type CheckCPUOperation ¶
type CheckCPUOperation struct { operation.BaseOperation CheckOperations Machine machine.IMachine }
func (*CheckCPUOperation) GetOperations ¶
func (ckops *CheckCPUOperation) GetOperations(config *pb.NodeCheckConfig) (operation.Operation, error)
type CheckDistributionOperation ¶
type CheckDistributionOperation struct { operation.BaseOperation CheckOperations Machine machine.IMachine }
func (*CheckDistributionOperation) CloseSSH ¶
func (ckops *CheckDistributionOperation) CloseSSH()
close ssh client
func (*CheckDistributionOperation) GetOperations ¶
func (ckops *CheckDistributionOperation) GetOperations(config *pb.NodeCheckConfig) (operation.Operation, error)
type CheckDockerOperation ¶
type CheckDockerOperation struct { operation.BaseOperation CheckOperations Machine machine.IMachine }
func (*CheckDockerOperation) CloseSSH ¶
func (ckops *CheckDockerOperation) CloseSSH()
close ssh client
func (*CheckDockerOperation) GetOperations ¶
func (ckops *CheckDockerOperation) GetOperations(config *pb.NodeCheckConfig) (operation.Operation, error)
type CheckKernelOperation ¶
type CheckKernelOperation struct { operation.BaseOperation CheckOperations Machine machine.IMachine }
func (*CheckKernelOperation) CloseSSH ¶
func (ckops *CheckKernelOperation) CloseSSH()
close ssh client
func (*CheckKernelOperation) GetOperations ¶
func (ckops *CheckKernelOperation) GetOperations(config *pb.NodeCheckConfig) (operation.Operation, error)
type CheckMemoryOperation ¶
type CheckMemoryOperation struct { operation.BaseOperation CheckOperations Machine machine.IMachine }
func (*CheckMemoryOperation) CloseSSH ¶
func (ckops *CheckMemoryOperation) CloseSSH()
close ssh client
func (*CheckMemoryOperation) GetOperations ¶
func (ckops *CheckMemoryOperation) GetOperations(config *pb.NodeCheckConfig) (operation.Operation, error)
type CheckOperations ¶
type CheckPortOccupiedOperation ¶
type CheckPortOccupiedOperation struct { operation.BaseOperation CheckOperations Machine machine.IMachine }
func (*CheckPortOccupiedOperation) CloseSSH ¶
func (ckops *CheckPortOccupiedOperation) CloseSSH()
close ssh client
func (*CheckPortOccupiedOperation) GetOperations ¶
func (ckops *CheckPortOccupiedOperation) GetOperations(config *pb.NodeCheckConfig) (operation.Operation, error)
type CheckRootDiskOperation ¶
type CheckRootDiskOperation struct { operation.BaseOperation CheckOperations Machine machine.IMachine }
func (*CheckRootDiskOperation) CloseSSH ¶
func (ckops *CheckRootDiskOperation) CloseSSH()
close ssh client
func (*CheckRootDiskOperation) GetOperations ¶
func (ckops *CheckRootDiskOperation) GetOperations(config *pb.NodeCheckConfig) (operation.Operation, error)
type CheckSysPrefOperation ¶
type CheckSysPrefOperation struct { operation.BaseOperation CheckOperations Machine machine.IMachine }
func (*CheckSysPrefOperation) CloseSSH ¶
func (ckops *CheckSysPrefOperation) CloseSSH()
close ssh client
func (*CheckSysPrefOperation) GetOperations ¶
func (ckops *CheckSysPrefOperation) GetOperations(config *pb.NodeCheckConfig) (operation.Operation, error)
type CheckSystemManagerOperation ¶
type CheckSystemManagerOperation struct { operation.BaseOperation CheckOperations Machine machine.IMachine }
func (*CheckSystemManagerOperation) CloseSSH ¶
func (ckops *CheckSystemManagerOperation) CloseSSH()
close ssh client
func (*CheckSystemManagerOperation) GetOperations ¶
func (ckops *CheckSystemManagerOperation) GetOperations(config *pb.NodeCheckConfig) (operation.Operation, error)
type ItemEnum ¶
type ItemEnum string
const ( Docker ItemEnum = "docker" CPU ItemEnum = "cpu" Kernel ItemEnum = "kernel" Memory ItemEnum = "memory" Disk ItemEnum = "disk" Distribution ItemEnum = "distribution" SystemPreference ItemEnum = "system-preference" SystemManager ItemEnum = "system-manager" PortOccupied ItemEnum = "port-occupied" )
type OperationsGenerator ¶
func NewCheckOperations ¶
func NewCheckOperations() *OperationsGenerator
func (*OperationsGenerator) CreateOperations ¶
func (og *OperationsGenerator) CreateOperations(item ItemEnum) CheckAction
Click to show internal directories.
Click to hide internal directories.