當前位置: 首頁>>代碼示例>>Golang>>正文


Golang intstr.DeepCopy_intstr_IntOrString函數代碼示例

本文整理匯總了Golang中k8s/io/kubernetes/pkg/util/intstr.DeepCopy_intstr_IntOrString函數的典型用法代碼示例。如果您正苦於以下問題:Golang DeepCopy_intstr_IntOrString函數的具體用法?Golang DeepCopy_intstr_IntOrString怎麽用?Golang DeepCopy_intstr_IntOrString使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了DeepCopy_intstr_IntOrString函數的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。

示例1: DeepCopy_extensions_RollingUpdateDeployment

func DeepCopy_extensions_RollingUpdateDeployment(in RollingUpdateDeployment, out *RollingUpdateDeployment, c *conversion.Cloner) error {
	if err := intstr.DeepCopy_intstr_IntOrString(in.MaxUnavailable, &out.MaxUnavailable, c); err != nil {
		return err
	}
	if err := intstr.DeepCopy_intstr_IntOrString(in.MaxSurge, &out.MaxSurge, c); err != nil {
		return err
	}
	return nil
}
開發者ID:ysh7,項目名稱:kubernetes,代碼行數:9,代碼來源:deep_copy_generated.go

示例2: DeepCopy_api_RollingDeploymentStrategyParams

func DeepCopy_api_RollingDeploymentStrategyParams(in RollingDeploymentStrategyParams, out *RollingDeploymentStrategyParams, c *conversion.Cloner) error {
	if in.UpdatePeriodSeconds != nil {
		in, out := in.UpdatePeriodSeconds, &out.UpdatePeriodSeconds
		*out = new(int64)
		**out = *in
	} else {
		out.UpdatePeriodSeconds = nil
	}
	if in.IntervalSeconds != nil {
		in, out := in.IntervalSeconds, &out.IntervalSeconds
		*out = new(int64)
		**out = *in
	} else {
		out.IntervalSeconds = nil
	}
	if in.TimeoutSeconds != nil {
		in, out := in.TimeoutSeconds, &out.TimeoutSeconds
		*out = new(int64)
		**out = *in
	} else {
		out.TimeoutSeconds = nil
	}
	if err := intstr.DeepCopy_intstr_IntOrString(in.MaxUnavailable, &out.MaxUnavailable, c); err != nil {
		return err
	}
	if err := intstr.DeepCopy_intstr_IntOrString(in.MaxSurge, &out.MaxSurge, c); err != nil {
		return err
	}
	if in.UpdatePercent != nil {
		in, out := in.UpdatePercent, &out.UpdatePercent
		*out = new(int32)
		**out = *in
	} else {
		out.UpdatePercent = nil
	}
	if in.Pre != nil {
		in, out := in.Pre, &out.Pre
		*out = new(LifecycleHook)
		if err := DeepCopy_api_LifecycleHook(*in, *out, c); err != nil {
			return err
		}
	} else {
		out.Pre = nil
	}
	if in.Post != nil {
		in, out := in.Post, &out.Post
		*out = new(LifecycleHook)
		if err := DeepCopy_api_LifecycleHook(*in, *out, c); err != nil {
			return err
		}
	} else {
		out.Post = nil
	}
	return nil
}
開發者ID:ZenoRewn,項目名稱:origin,代碼行數:55,代碼來源:deep_copy_generated.go

示例3: DeepCopy_v1beta1_IngressBackend

func DeepCopy_v1beta1_IngressBackend(in IngressBackend, out *IngressBackend, c *conversion.Cloner) error {
	out.ServiceName = in.ServiceName
	if err := intstr.DeepCopy_intstr_IntOrString(in.ServicePort, &out.ServicePort, c); err != nil {
		return err
	}
	return nil
}
開發者ID:Cloven,項目名稱:minikube,代碼行數:7,代碼來源:deep_copy_generated.go

示例4: DeepCopy_v1beta1_RollingUpdateDeployment

func DeepCopy_v1beta1_RollingUpdateDeployment(in RollingUpdateDeployment, out *RollingUpdateDeployment, c *conversion.Cloner) error {
	if in.MaxUnavailable != nil {
		in, out := in.MaxUnavailable, &out.MaxUnavailable
		*out = new(intstr.IntOrString)
		if err := intstr.DeepCopy_intstr_IntOrString(*in, *out, c); err != nil {
			return err
		}
	} else {
		out.MaxUnavailable = nil
	}
	if in.MaxSurge != nil {
		in, out := in.MaxSurge, &out.MaxSurge
		*out = new(intstr.IntOrString)
		if err := intstr.DeepCopy_intstr_IntOrString(*in, *out, c); err != nil {
			return err
		}
	} else {
		out.MaxSurge = nil
	}
	return nil
}
開發者ID:Cloven,項目名稱:minikube,代碼行數:21,代碼來源:deep_copy_generated.go

示例5: DeepCopy_v1alpha1_PodDisruptionBudgetSpec

func DeepCopy_v1alpha1_PodDisruptionBudgetSpec(in PodDisruptionBudgetSpec, out *PodDisruptionBudgetSpec, c *conversion.Cloner) error {
	if err := intstr.DeepCopy_intstr_IntOrString(in.MinAvailable, &out.MinAvailable, c); err != nil {
		return err
	}
	if in.Selector != nil {
		in, out := in.Selector, &out.Selector
		*out = new(unversioned.LabelSelector)
		if err := unversioned.DeepCopy_unversioned_LabelSelector(*in, *out, c); err != nil {
			return err
		}
	} else {
		out.Selector = nil
	}
	return nil
}
開發者ID:XbinZh,項目名稱:kubernetes,代碼行數:15,代碼來源:deep_copy_generated.go

示例6: DeepCopy_v1beta1_NetworkPolicyPort

func DeepCopy_v1beta1_NetworkPolicyPort(in NetworkPolicyPort, out *NetworkPolicyPort, c *conversion.Cloner) error {
	if in.Protocol != nil {
		in, out := in.Protocol, &out.Protocol
		*out = new(v1.Protocol)
		**out = *in
	} else {
		out.Protocol = nil
	}
	if in.Port != nil {
		in, out := in.Port, &out.Port
		*out = new(intstr.IntOrString)
		if err := intstr.DeepCopy_intstr_IntOrString(*in, *out, c); err != nil {
			return err
		}
	} else {
		out.Port = nil
	}
	return nil
}
開發者ID:Cloven,項目名稱:minikube,代碼行數:19,代碼來源:deep_copy_generated.go

示例7: DeepCopy_extensions_NetworkPolicyPort

func DeepCopy_extensions_NetworkPolicyPort(in NetworkPolicyPort, out *NetworkPolicyPort, c *conversion.Cloner) error {
	if in.Protocol != nil {
		in, out := in.Protocol, &out.Protocol
		*out = new(api.Protocol)
		if newVal, err := c.DeepCopy(*in); err != nil {
			return err
		} else {
			**out = newVal.(api.Protocol)
		}
	} else {
		out.Protocol = nil
	}
	if in.Port != nil {
		in, out := in.Port, &out.Port
		*out = new(intstr.IntOrString)
		if err := intstr.DeepCopy_intstr_IntOrString(*in, *out, c); err != nil {
			return err
		}
	} else {
		out.Port = nil
	}
	return nil
}
開發者ID:40a,項目名稱:bootkube,代碼行數:23,代碼來源:deep_copy_generated.go

示例8: DeepCopy_api_RoutePort

func DeepCopy_api_RoutePort(in RoutePort, out *RoutePort, c *conversion.Cloner) error {
	if err := intstr.DeepCopy_intstr_IntOrString(in.TargetPort, &out.TargetPort, c); err != nil {
		return err
	}
	return nil
}
開發者ID:rhamilto,項目名稱:origin,代碼行數:6,代碼來源:deep_copy_generated.go


注:本文中的k8s/io/kubernetes/pkg/util/intstr.DeepCopy_intstr_IntOrString函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。