feat: implement container network attaching

Containers can be attached:

- after they are created, but before they are started
- after a successful deploy, but before the proxy reloads

This allows folks to have flexibility around when they would like a container to be made available to a network.
This commit is contained in:
Jose Diaz-Gonzalez
2020-02-03 04:37:31 -05:00
parent 8eb32e4371
commit 9818cc6461
13 changed files with 384 additions and 20 deletions

View File

@@ -63,12 +63,22 @@ func main() {
case "post-app-clone-setup":
appName := flag.Arg(1)
network.TriggerPostAppCloneSetup(appName)
case "post-container-create":
containerType := flag.Arg(0)
containerID := flag.Arg(1)
appName := flag.Arg(2)
phase := flag.Arg(3)
processType := flag.Arg(4)
network.TriggerPostContainerCreate(containerType, containerID, appName, phase, processType)
case "post-create":
appName := flag.Arg(0)
network.TriggerPostCreate(appName)
case "post-delete":
appName := flag.Arg(0)
network.TriggerPostDelete(appName)
case "core-post-deploy":
appName := flag.Arg(0)
network.TriggerCorePostDeploy(appName)
case "report":
appName := flag.Arg(0)
network.ReportSingleApp(appName, "")