Added RunEdgeApp and StopEdgeApp funcs

loop_loop_execution
Paulo Truta 2021-02-17 01:24:51 +01:00
parent 63d81e8662
commit b04e854fdd
1 changed files with 20 additions and 0 deletions

View File

@ -120,3 +120,23 @@ func GetEdgeAppServices(ID string) []EdgeAppService {
return edgeAppServices
}
// RunEdgeApp : Run an EdgeApp and return its most current status
func RunEdgeApp(ID string) EdgeAppStatus {
cmdArgs := []string{"-f", wsPath + "/docker-compose.yml", "up", ID}
utils.Exec("docker-compose", cmdArgs)
return GetEdgeAppStatus(ID)
}
// StopEdgeApp : Stops an EdgeApp and return its most current status
func StopEdgeApp(ID string) EdgeAppStatus {
cmdArgs := []string{"-f", wsPath + "/docker-compose.yml", "down", ID}
utils.Exec("docker-compose", cmdArgs)
return GetEdgeAppStatus(ID)
}