本文整理汇总了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
}
示例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
}
示例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
}
示例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
}
示例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
}
示例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
}
示例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
}
示例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
}