// Run is the entrypoint to start the uninstall process
Run is the entrypoint to start the uninstall process
// Run is the entrypoint to start the uninstall process
func (o *ClusterUninstaller) Run() error {
	deleteFuncs := map[string]deleteFunc{}
	populateDeleteFuncs(deleteFuncs)
	returnChannel := make(chan string)
	conn, err := libvirt.NewConnect(o.LibvirtURI)
	if err != nil {
		return errors.Wrap(err, "failed to connect to Libvirt daemon")
	}
	for name, function := range deleteFuncs {
		go deleteRunner(name, function, conn, o.Filter, o.Logger, returnChannel)
	}
	for i := 0; i < len(deleteFuncs); i++ {
		select {
		case res := <-returnChannel:
			o.Logger.Debugf("goroutine %v complete", res)
		}
	}
	return nil
}
func ( o * ClusterUninstaller ) Run ( ) error { deleteFuncs := map [ string ] deleteFunc { } populateDeleteFuncs ( deleteFuncs ) returnChannel := make ( chan string ) conn , err := libvirt . NewConnect ( o . LibvirtURI ) if err != nil { return errors . Wrap ( err , " " ) } for name , function := range deleteFuncs { go deleteRunner ( name , function , conn , o . Filter , o . Logger , returnChannel ) } for i := 0 ; i < len ( deleteFuncs ) ; i ++ { select { case res := <- returnChannel : o . Logger . Debugf ( " " , res ) } } return nil }
Run is the entrypoint to start the uninstall process
Run is the entrypoint to start the uninstall process
// launch goroutines // wait for them to finish