Documentation ¶
Index ¶
- func AddDeploymentFile(filePath string) error
- func CheckBootTime()
- func CopyFile(src, dst string) (int64, error)
- func DeleteDeployment(deploymentName string) error
- func ForegroundDeployments()
- func GetState() *ini.File
- func HasDeployment(deploymentName string) bool
- func HasLettersOnly(s string) bool
- func RefactorAllDeploymentFile()
- func RefactorDeploymentFile(deploymentName string)
- func RestartDeployment(deploymentName string) error
- func ShowAvailableMemory()
- func SimpleCommandInvoker(commandName string, args []string) int
- func StartDeployment(deploymentName string)
- func StopDeployment(deploymentName string) error
- func StringInSlice(a string, list []string) bool
- func TailDeployment(deploymentName string)
- func UpdateState()
- type DeploymentData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddDeploymentFile ¶
AddDeploymentFile copy deployment file to config dir and validates. Returns error message if file doesn't exist or is invalid.
func CheckBootTime ¶
func CheckBootTime()
CheckBootTime update boot time in state.ini and delete all processes from "processes" section if boot time changes.
func ForegroundDeployments ¶
func ForegroundDeployments()
ForegroundDeployments keep running and respawn all deployments
func HasDeployment ¶
HasDeployment if deployment does exist.
func HasLettersOnly ¶
HasLettersOnly returns true if all string is letters
func RefactorAllDeploymentFile ¶
func RefactorAllDeploymentFile()
RefactorAllDeploymentFile check all content and update values based on DeploymentData struct of all files
func RefactorDeploymentFile ¶
func RefactorDeploymentFile(deploymentName string)
RefactorDeploymentFile check all content and update values based on DeploymentData struct
func ShowAvailableMemory ¶
func ShowAvailableMemory()
ShowAvailableMemory prints the available memory
func SimpleCommandInvoker ¶
SimpleCommandInvoker and add it to a pull
func StartDeployment ¶
func StartDeployment(deploymentName string)
StartDeployment if is not running
func StopDeployment ¶
StopDeployment and returns nil if no error
func StringInSlice ¶
StringInSlice returns if string exist in slice.
func TailDeployment ¶
func TailDeployment(deploymentName string)
TailDeployment is equivalent to "tail -f" for all deployment output
Types ¶
type DeploymentData ¶
type DeploymentData struct { Type string `yaml:"type"` Name string `yaml:"name"` CMD []string `yaml:"cmd"` PID int Status string CPU struct { Limit int `yaml:"limit"` } Linux struct { User string `yaml:"user"` } }
DeploymentData configs from YAML file
func GetDeploymentByFilePath ¶
func GetDeploymentByFilePath(filePath string) DeploymentData
GetDeploymentByFilePath and returns the DeploymentData populated.
func GetDeploymentByName ¶
func GetDeploymentByName(deploymentName string) DeploymentData
GetDeploymentByName search the deployment by name and returns a DeploymentData populated.
func GetDeployments ¶
func GetDeployments() []DeploymentData
GetDeployments return an array of DeploymentData