Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for deepCopyStringMap (0.48 sec)

  1. pkg/apis/autoscaling/helpers.go

    	if hasMetricsSpecs || hasBehaviorSpecs || hasMetricsStatuses || hasConditions {
    		out = DeepCopyStringMap(in)
    		delete(out, MetricSpecsAnnotation)
    		delete(out, BehaviorSpecsAnnotation)
    		delete(out, MetricStatusesAnnotation)
    		delete(out, HorizontalPodAutoscalerConditionsAnnotation)
    		return out, true
    	}
    	return in, false
    }
    
    // DeepCopyStringMap returns a copy of the input map.
    // If input is nil, an empty map is returned.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jul 26 17:14:05 UTC 2022
    - 2.2K bytes
    - Viewed (0)
  2. pkg/apis/apps/v1/conversion.go

    			return err
    		} else {
    			out.Spec.TemplateGeneration = value64
    			out.Annotations = deepCopyStringMap(out.Annotations)
    			delete(out.Annotations, appsv1.DeprecatedTemplateGeneration)
    		}
    	}
    	return nil
    }
    
    func deepCopyStringMap(m map[string]string) map[string]string {
    	ret := make(map[string]string, len(m))
    	for k, v := range m {
    		ret[k] = v
    	}
    	return ret
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Sep 23 23:36:24 UTC 2022
    - 6.2K bytes
    - Viewed (0)
  3. pkg/apis/apps/v1beta2/conversion.go

    			return err
    		} else {
    			out.Spec.TemplateGeneration = value64
    			out.Annotations = deepCopyStringMap(out.Annotations)
    			delete(out.Annotations, appsv1beta2.DeprecatedTemplateGeneration)
    		}
    	}
    
    	return nil
    }
    
    func deepCopyStringMap(m map[string]string) map[string]string {
    	ret := make(map[string]string, len(m))
    	for k, v := range m {
    		ret[k] = v
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Sep 23 23:36:24 UTC 2022
    - 8.3K bytes
    - Viewed (0)
  4. pkg/apis/autoscaling/v1/conversion.go

    		otherMetricsEnc, err := json.Marshal(otherMetrics)
    		if err != nil {
    			return err
    		}
    		// copy before mutating
    		if !copiedAnnotations {
    			copiedAnnotations = true
    			out.Annotations = autoscaling.DeepCopyStringMap(out.Annotations)
    		}
    		out.Annotations[autoscaling.MetricSpecsAnnotation] = string(otherMetricsEnc)
    	}
    
    	if len(in.Status.CurrentMetrics) > 0 {
    		currentMetricsEnc, err := json.Marshal(currentMetrics)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jul 16 03:29:22 UTC 2021
    - 21.2K bytes
    - Viewed (0)
  5. pkg/apis/autoscaling/v2beta1/conversion.go

    		if err != nil {
    			return err
    		}
    		// copy before mutating
    		if !copiedAnnotations {
    			//nolint:ineffassign
    			copiedAnnotations = true
    			out.Annotations = autoscaling.DeepCopyStringMap(out.Annotations)
    		}
    		out.Annotations[autoscaling.BehaviorSpecsAnnotation] = string(behaviorEnc)
    	}
    
    	return nil
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Mar 03 16:28:10 UTC 2021
    - 13.4K bytes
    - Viewed (0)
Back to top