operation

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 31, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SplitSymbol              = "."
	CheckEqual               = "="
	CheckLarge               = ">"
	CheckLess                = "<"
	ErrParaEmpty             = "parameter empty"
	ErrPara                  = "parameter error"
	ErrInvalid               = "parameter invalid"
	ErrSplitSym              = "error split symbol found"
	ErrParaInput             = "input parameter invalid"
	ErrTooHigh               = "version too high"
	ErrTooLow                = "version too low"
	ErrNotEqual              = "version not equal"
	ErrNotEnough             = "amount not enough"
	UnclearInputPara         = "input parameter not clear"
	GiByteUnits      float64 = 1000 * 1000 * 1000
)
View Source
const (
	InitRemoteScriptPath = "/tmp"
)

Variables

This section is empty.

Functions

func CheckEntity

func CheckEntity(comparedEntity string, desiredEntity float64) error

check if entity resource satisfied minimal requirements

func CheckIPValid

func CheckIPValid(rawIP string) bool

check if ip valid as 0.0.0.0 or defined in RFC1122, RFC4632, RFC4291

func CheckVersion

func CheckVersion(comparedVersion string, standardVersion string, comparedSymbol string) error

check if version is satisfied with standard version checkStandard controls compared method

Types

type BaseOperation

type BaseOperation struct {
	Commands []command.Command
}

func (*BaseOperation) AddCommands

func (op *BaseOperation) AddCommands(commands ...command.Command)

func (*BaseOperation) Do

func (op *BaseOperation) Do() (stdout, stderr []byte, err error)

func (*BaseOperation) ResetCommands

func (op *BaseOperation) ResetCommands()

type NodeInitAction

type NodeInitAction struct {
	NodeInitConfig *pb.NodeDeployConfig
	NodesConfig    []*pb.NodeDeployConfig
	ClusterConfig  *pb.ClusterConfig
}

type Operation

type Operation interface {
	AddCommands(commands ...command.Command)
	Do() ([]byte, []byte, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL