diff options
| author | Jeff Carr <[email protected]> | 2024-11-06 05:24:25 -0600 | 
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-11-06 05:24:25 -0600 | 
| commit | 9e34b3d3f4f1d6593c088ee058aaa055da433988 (patch) | |
| tree | ece0d3c3cae71187bd074d8c6257ff6e18947bc2 | |
| parent | 15efe46bc4f99975bab107c5387b8c8a70e0020a (diff) | |
still runs
Signed-off-by: Jeff Carr <[email protected]>
| -rw-r--r-- | cloud.go | 12 | 
1 files changed, 12 insertions, 0 deletions
@@ -1,5 +1,13 @@  package virtigolib +// makes a Cluster interface which is: + +// a number of hypervisors (the physical machines) +// a list of the virtual machines +// functions to start, stop, etc virtual machines + +// virtual machines are often called droplets to make it easier to understand +  import (  	"context"  	"errors" @@ -30,6 +38,7 @@ type cloudAPI interface {  }  func NewCloud() *CloudManager { +	// client := virtbuf.NewRealCloudAPIClient()  	// clusterManager := NewCloudManager(myClient)  	newCloudManager := &CloudManager{client: myClient} @@ -45,6 +54,9 @@ func NewCloud() *CloudManager {  // FindByName retrieves a cluster by name.  func (m *CloudManager) FindDropletByName(name string) (*virtbuf.Droplet, error) { +	if m.cluster == nil { +		return nil, nil +	}  	d := m.cluster.FindDropletByName(name)  	return d, nil  }  | 
