Documentation ¶
Index ¶
- type MockGCECloud
- func (c *MockGCECloud) AllResources() map[string]interface{}
- func (c *MockGCECloud) CloudDNS() gce.DNSClient
- func (c *MockGCECloud) CloudResourceManager() *cloudresourcemanager.Service
- func (c *MockGCECloud) Compute() gce.ComputeClient
- func (c *MockGCECloud) DNS() (dnsprovider.Interface, error)
- func (c *MockGCECloud) DeleteGroup(g *cloudinstances.CloudInstanceGroup) error
- func (c *MockGCECloud) DeleteInstance(i *cloudinstances.CloudInstance) error
- func (c *MockGCECloud) DeregisterInstance(i *cloudinstances.CloudInstance) error
- func (c *MockGCECloud) DetachInstance(i *cloudinstances.CloudInstance) error
- func (c *MockGCECloud) FindClusterStatus(cluster *kops.Cluster) (*kops.ClusterStatus, error)
- func (c *MockGCECloud) FindVPCInfo(id string) (*fi.VPCInfo, error)
- func (c *MockGCECloud) GetApiIngressStatus(cluster *kops.Cluster) ([]fi.ApiIngressStatus, error)
- func (c *MockGCECloud) GetCloudGroups(cluster *kops.Cluster, instancegroups []*kops.InstanceGroup, ...) (map[string]*cloudinstances.CloudInstanceGroup, error)
- func (c *MockGCECloud) IAM() gce.IamClient
- func (c *MockGCECloud) Labels() map[string]string
- func (c *MockGCECloud) Project() string
- func (c *MockGCECloud) ProviderID() kops.CloudProviderID
- func (c *MockGCECloud) Region() string
- func (c *MockGCECloud) ServiceAccount() (string, error)
- func (c *MockGCECloud) Storage() *storage.Service
- func (c *MockGCECloud) WaitForOp(op *compute.Operation) error
- func (c *MockGCECloud) WithLabels(labels map[string]string) gce.GCECloud
- func (c *MockGCECloud) Zones() ([]string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockGCECloud ¶
type MockGCECloud struct {
// contains filtered or unexported fields
}
MockGCECloud is a mock implementation of GCECloud for testing
func InstallMockGCECloud ¶
func InstallMockGCECloud(region string, project string) *MockGCECloud
InstallMockGCECloud registers a MockGCECloud implementation for the specified region & project
func (*MockGCECloud) AllResources ¶
func (c *MockGCECloud) AllResources() map[string]interface{}
func (*MockGCECloud) CloudDNS ¶
func (c *MockGCECloud) CloudDNS() gce.DNSClient
CloudDNS returns the DNS client
func (*MockGCECloud) CloudResourceManager ¶ added in v1.24.0
func (c *MockGCECloud) CloudResourceManager() *cloudresourcemanager.Service
CloudResourceManager returns the client for the cloudresourcemanager API
func (*MockGCECloud) Compute ¶
func (c *MockGCECloud) Compute() gce.ComputeClient
Compute implements GCECloud::Compute
func (*MockGCECloud) DNS ¶
func (c *MockGCECloud) DNS() (dnsprovider.Interface, error)
DNS implements fi.Cloud::DNS
func (*MockGCECloud) DeleteGroup ¶
func (c *MockGCECloud) DeleteGroup(g *cloudinstances.CloudInstanceGroup) error
DeleteGroup implements fi.Cloud::DeleteGroup
func (*MockGCECloud) DeleteInstance ¶
func (c *MockGCECloud) DeleteInstance(i *cloudinstances.CloudInstance) error
DeleteInstance deletes a GCE instance
func (*MockGCECloud) DeregisterInstance ¶ added in v1.24.0
func (c *MockGCECloud) DeregisterInstance(i *cloudinstances.CloudInstance) error
func (*MockGCECloud) DetachInstance ¶
func (c *MockGCECloud) DetachInstance(i *cloudinstances.CloudInstance) error
DetachInstance is not implemented yet. It needs to cause a cloud instance to no longer be counted against the group's size limits.
func (*MockGCECloud) FindClusterStatus ¶
func (c *MockGCECloud) FindClusterStatus(cluster *kops.Cluster) (*kops.ClusterStatus, error)
FindClusterStatus implements GCECloud::FindClusterStatus
func (*MockGCECloud) FindVPCInfo ¶
func (c *MockGCECloud) FindVPCInfo(id string) (*fi.VPCInfo, error)
FindVPCInfo implements fi.Cloud::FindVPCInfo
func (*MockGCECloud) GetApiIngressStatus ¶
func (c *MockGCECloud) GetApiIngressStatus(cluster *kops.Cluster) ([]fi.ApiIngressStatus, error)
GetApiIngressStatus implements GCECloud::GetApiIngressStatus
func (*MockGCECloud) GetCloudGroups ¶
func (c *MockGCECloud) GetCloudGroups(cluster *kops.Cluster, instancegroups []*kops.InstanceGroup, warnUnmatched bool, nodes []v1.Node) (map[string]*cloudinstances.CloudInstanceGroup, error)
GetCloudGroups is not implemented yet
func (*MockGCECloud) Labels ¶
func (c *MockGCECloud) Labels() map[string]string
Labels implements GCECloud::Labels
func (*MockGCECloud) Project ¶
func (c *MockGCECloud) Project() string
Project implements GCECloud::Project
func (*MockGCECloud) ProviderID ¶
func (c *MockGCECloud) ProviderID() kops.CloudProviderID
ProviderID implements fi.Cloud::ProviderID
func (*MockGCECloud) Region ¶
func (c *MockGCECloud) Region() string
Region implements GCECloud::Region
func (*MockGCECloud) ServiceAccount ¶
func (c *MockGCECloud) ServiceAccount() (string, error)
ServiceAccount implements GCECloud::ServiceAccount
func (*MockGCECloud) Storage ¶
func (c *MockGCECloud) Storage() *storage.Service
Storage implements GCECloud::Storage
func (*MockGCECloud) WaitForOp ¶
func (c *MockGCECloud) WaitForOp(op *compute.Operation) error
WaitForOp implements GCECloud::WaitForOp
func (*MockGCECloud) WithLabels ¶
func (c *MockGCECloud) WithLabels(labels map[string]string) gce.GCECloud
WithLabels returns a copy of the MockGCECloud bound to the specified labels
func (*MockGCECloud) Zones ¶
func (c *MockGCECloud) Zones() ([]string, error)
Zones is not implemented yet