github.com/wanddynosios/cli/v8@v8.7.9-0.20240221182337-1a92e3a7017f/actor/v7pushaction/actualize.go (about) 1 package v7pushaction 2 3 import ( 4 log "github.com/sirupsen/logrus" 5 ) 6 7 func (actor Actor) Actualize(plan PushPlan, progressBar ProgressBar) <-chan *PushEvent { 8 log.Debugln("Starting to Actualize Push plan:", plan) 9 eventStream := make(chan *PushEvent) 10 11 go func() { 12 log.Debug("starting actualize go routine") 13 defer close(eventStream) 14 15 var err error 16 var warnings Warnings 17 for _, changeAppFunc := range actor.ChangeApplicationSequence(plan) { 18 plan, warnings, err = changeAppFunc(plan, eventStream, progressBar) 19 eventStream <- &PushEvent{Plan: plan, Err: err, Warnings: warnings} 20 if err != nil { 21 return 22 } 23 } 24 25 log.Debug("completed apply") 26 }() 27 28 return eventStream 29 }