"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "staging/src/k8s.io/cloud-provider/fake/fake.go" between
kubernetes-1.15.9.tar.gz and kubernetes-1.15.10.tar.gz

About: Kubernetes is a platform for automating deployment, scaling, and operations of application containers across clusters of hosts (written in "Go"). 1.15.x series.

fake.go  (kubernetes-1.15.9):fake.go  (kubernetes-1.15.10)
skipping to change at line 71 skipping to change at line 71
ExistsByProviderID bool ExistsByProviderID bool
ErrByProviderID error ErrByProviderID error
NodeShutdown bool NodeShutdown bool
ErrShutdownByProviderID error ErrShutdownByProviderID error
Calls []string Calls []string
Addresses []v1.NodeAddress Addresses []v1.NodeAddress
addressesMux sync.Mutex addressesMux sync.Mutex
ExtID map[types.NodeName]string ExtID map[types.NodeName]string
ExtIDErr map[types.NodeName]error
InstanceTypes map[types.NodeName]string InstanceTypes map[types.NodeName]string
Machines []types.NodeName Machines []types.NodeName
NodeResources *v1.NodeResources NodeResources *v1.NodeResources
ClusterList []string ClusterList []string
MasterName string MasterName string
ExternalIP net.IP ExternalIP net.IP
Balancers map[string]Balancer Balancers map[string]Balancer
UpdateCalls []UpdateBalancerCall UpdateCalls []UpdateBalancerCall
RouteMap map[string]*Route RouteMap map[string]*Route
Lock sync.Mutex Lock sync.Mutex
skipping to change at line 255 skipping to change at line 256
// NodeAddressesByProviderID is a test-spy implementation of Instances.NodeAddre ssesByProviderID. // NodeAddressesByProviderID is a test-spy implementation of Instances.NodeAddre ssesByProviderID.
// It adds an entry "node-addresses-by-provider-id" into the internal method cal l record. // It adds an entry "node-addresses-by-provider-id" into the internal method cal l record.
func (f *Cloud) NodeAddressesByProviderID(ctx context.Context, providerID string ) ([]v1.NodeAddress, error) { func (f *Cloud) NodeAddressesByProviderID(ctx context.Context, providerID string ) ([]v1.NodeAddress, error) {
f.addCall("node-addresses-by-provider-id") f.addCall("node-addresses-by-provider-id")
f.addressesMux.Lock() f.addressesMux.Lock()
defer f.addressesMux.Unlock() defer f.addressesMux.Unlock()
return f.Addresses, f.Err return f.Addresses, f.Err
} }
// InstanceID returns the cloud provider ID of the node with the specified Name. // InstanceID returns the cloud provider ID of the node with the specified Name,
unless an entry
// for the node exists in ExtIDError, in which case it returns the desired error
(to facilitate
// testing of error handling).
func (f *Cloud) InstanceID(ctx context.Context, nodeName types.NodeName) (string , error) { func (f *Cloud) InstanceID(ctx context.Context, nodeName types.NodeName) (string , error) {
f.addCall("instance-id") f.addCall("instance-id")
err, ok := f.ExtIDErr[nodeName]
if ok {
return "", err
}
return f.ExtID[nodeName], nil return f.ExtID[nodeName], nil
} }
// InstanceType returns the type of the specified instance. // InstanceType returns the type of the specified instance.
func (f *Cloud) InstanceType(ctx context.Context, instance types.NodeName) (stri ng, error) { func (f *Cloud) InstanceType(ctx context.Context, instance types.NodeName) (stri ng, error) {
f.addCall("instance-type") f.addCall("instance-type")
return f.InstanceTypes[instance], nil return f.InstanceTypes[instance], nil
} }
// InstanceTypeByProviderID returns the type of the specified instance. // InstanceTypeByProviderID returns the type of the specified instance.
 End of changes. 3 change blocks. 
1 lines changed or deleted 12 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)