当前位置: 首页>>代码示例>>Golang>>正文


Golang unversioned.DeepCopy_unversioned_LabelSelector函数代码示例

本文整理汇总了Golang中k8s/io/kubernetes/pkg/api/unversioned.DeepCopy_unversioned_LabelSelector函数的典型用法代码示例。如果您正苦于以下问题:Golang DeepCopy_unversioned_LabelSelector函数的具体用法?Golang DeepCopy_unversioned_LabelSelector怎么用?Golang DeepCopy_unversioned_LabelSelector使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了DeepCopy_unversioned_LabelSelector函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。

示例1: DeepCopy_extensions_NetworkPolicyPeer

func DeepCopy_extensions_NetworkPolicyPeer(in interface{}, out interface{}, c *conversion.Cloner) error {
	{
		in := in.(*NetworkPolicyPeer)
		out := out.(*NetworkPolicyPeer)
		if in.PodSelector != nil {
			in, out := &in.PodSelector, &out.PodSelector
			*out = new(unversioned.LabelSelector)
			if err := unversioned.DeepCopy_unversioned_LabelSelector(*in, *out, c); err != nil {
				return err
			}
		} else {
			out.PodSelector = nil
		}
		if in.NamespaceSelector != nil {
			in, out := &in.NamespaceSelector, &out.NamespaceSelector
			*out = new(unversioned.LabelSelector)
			if err := unversioned.DeepCopy_unversioned_LabelSelector(*in, *out, c); err != nil {
				return err
			}
		} else {
			out.NamespaceSelector = nil
		}
		return nil
	}
}
开发者ID:ncdc,项目名称:kubernetes,代码行数:25,代码来源:zz_generated.deepcopy.go

示例2: DeepCopy_api_ClusterResourceQuotaSelector

func DeepCopy_api_ClusterResourceQuotaSelector(in interface{}, out interface{}, c *conversion.Cloner) error {
	{
		in := in.(*ClusterResourceQuotaSelector)
		out := out.(*ClusterResourceQuotaSelector)
		if in.LabelSelector != nil {
			in, out := &in.LabelSelector, &out.LabelSelector
			*out = new(unversioned.LabelSelector)
			if err := unversioned.DeepCopy_unversioned_LabelSelector(*in, *out, c); err != nil {
				return err
			}
		} else {
			out.LabelSelector = nil
		}
		if in.AnnotationSelector != nil {
			in, out := &in.AnnotationSelector, &out.AnnotationSelector
			*out = make(map[string]string)
			for key, val := range *in {
				(*out)[key] = val
			}
		} else {
			out.AnnotationSelector = nil
		}
		return nil
	}
}
开发者ID:juanluisvaladas,项目名称:origin,代码行数:25,代码来源:zz_generated.deepcopy.go

示例3: DeepCopy_v1_UserRestriction

func DeepCopy_v1_UserRestriction(in interface{}, out interface{}, c *conversion.Cloner) error {
	{
		in := in.(*UserRestriction)
		out := out.(*UserRestriction)
		if in.Users != nil {
			in, out := &in.Users, &out.Users
			*out = make([]string, len(*in))
			copy(*out, *in)
		} else {
			out.Users = nil
		}
		if in.Groups != nil {
			in, out := &in.Groups, &out.Groups
			*out = make([]string, len(*in))
			copy(*out, *in)
		} else {
			out.Groups = nil
		}
		if in.Selectors != nil {
			in, out := &in.Selectors, &out.Selectors
			*out = make([]unversioned.LabelSelector, len(*in))
			for i := range *in {
				if err := unversioned.DeepCopy_unversioned_LabelSelector(&(*in)[i], &(*out)[i], c); err != nil {
					return err
				}
			}
		} else {
			out.Selectors = nil
		}
		return nil
	}
}
开发者ID:php-coder,项目名称:origin,代码行数:32,代码来源:zz_generated.deepcopy.go

示例4: DeepCopy_v1alpha1_PetSetSpec

func DeepCopy_v1alpha1_PetSetSpec(in PetSetSpec, out *PetSetSpec, c *conversion.Cloner) error {
	if in.Replicas != nil {
		in, out := in.Replicas, &out.Replicas
		*out = new(int32)
		**out = *in
	} else {
		out.Replicas = nil
	}
	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
	}
	if err := v1.DeepCopy_v1_PodTemplateSpec(in.Template, &out.Template, c); err != nil {
		return err
	}
	if in.VolumeClaimTemplates != nil {
		in, out := in.VolumeClaimTemplates, &out.VolumeClaimTemplates
		*out = make([]v1.PersistentVolumeClaim, len(in))
		for i := range in {
			if err := v1.DeepCopy_v1_PersistentVolumeClaim(in[i], &(*out)[i], c); err != nil {
				return err
			}
		}
	} else {
		out.VolumeClaimTemplates = nil
	}
	out.ServiceName = in.ServiceName
	return nil
}
开发者ID:apcera,项目名称:kubernetes,代码行数:34,代码来源:deep_copy_generated.go

示例5: DeepCopy_apps_PetSetSpec

func DeepCopy_apps_PetSetSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
	{
		in := in.(*PetSetSpec)
		out := out.(*PetSetSpec)
		out.Replicas = in.Replicas
		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
		}
		if err := api.DeepCopy_api_PodTemplateSpec(&in.Template, &out.Template, c); err != nil {
			return err
		}
		if in.VolumeClaimTemplates != nil {
			in, out := &in.VolumeClaimTemplates, &out.VolumeClaimTemplates
			*out = make([]api.PersistentVolumeClaim, len(*in))
			for i := range *in {
				if err := api.DeepCopy_api_PersistentVolumeClaim(&(*in)[i], &(*out)[i], c); err != nil {
					return err
				}
			}
		} else {
			out.VolumeClaimTemplates = nil
		}
		out.ServiceName = in.ServiceName
		return nil
	}
}
开发者ID:RyanBinfeng,项目名称:kubernetes,代码行数:32,代码来源:zz_generated.deepcopy.go

示例6: DeepCopy_extensions_DeploymentSpec

func DeepCopy_extensions_DeploymentSpec(in DeploymentSpec, out *DeploymentSpec, c *conversion.Cloner) error {
	out.Replicas = in.Replicas
	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
	}
	if err := api.DeepCopy_api_PodTemplateSpec(in.Template, &out.Template, c); err != nil {
		return err
	}
	if err := DeepCopy_extensions_DeploymentStrategy(in.Strategy, &out.Strategy, c); err != nil {
		return err
	}
	out.MinReadySeconds = in.MinReadySeconds
	if in.RevisionHistoryLimit != nil {
		in, out := in.RevisionHistoryLimit, &out.RevisionHistoryLimit
		*out = new(int32)
		**out = *in
	} else {
		out.RevisionHistoryLimit = nil
	}
	out.Paused = in.Paused
	if in.RollbackTo != nil {
		in, out := in.RollbackTo, &out.RollbackTo
		*out = new(RollbackConfig)
		**out = *in
	} else {
		out.RollbackTo = nil
	}
	return nil
}
开发者ID:apcera,项目名称:kubernetes,代码行数:35,代码来源:deep_copy_generated.go

示例7: DeepCopy_v1beta1_DeploymentSpec

func DeepCopy_v1beta1_DeploymentSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
	{
		in := in.(*DeploymentSpec)
		out := out.(*DeploymentSpec)
		if in.Replicas != nil {
			in, out := &in.Replicas, &out.Replicas
			*out = new(int32)
			**out = **in
		} else {
			out.Replicas = nil
		}
		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
		}
		if err := v1.DeepCopy_v1_PodTemplateSpec(&in.Template, &out.Template, c); err != nil {
			return err
		}
		if err := DeepCopy_v1beta1_DeploymentStrategy(&in.Strategy, &out.Strategy, c); err != nil {
			return err
		}
		out.MinReadySeconds = in.MinReadySeconds
		if in.RevisionHistoryLimit != nil {
			in, out := &in.RevisionHistoryLimit, &out.RevisionHistoryLimit
			*out = new(int32)
			**out = **in
		} else {
			out.RevisionHistoryLimit = nil
		}
		out.Paused = in.Paused
		if in.RollbackTo != nil {
			in, out := &in.RollbackTo, &out.RollbackTo
			*out = new(RollbackConfig)
			**out = **in
		} else {
			out.RollbackTo = nil
		}
		if in.ProgressDeadlineSeconds != nil {
			in, out := &in.ProgressDeadlineSeconds, &out.ProgressDeadlineSeconds
			*out = new(int32)
			**out = **in
		} else {
			out.ProgressDeadlineSeconds = nil
		}
		return nil
	}
}
开发者ID:eljefedelrodeodeljefe,项目名称:kubernetes,代码行数:52,代码来源:zz_generated.deepcopy.go

示例8: DeepCopy_extensions_ScaleStatus

func DeepCopy_extensions_ScaleStatus(in ScaleStatus, out *ScaleStatus, c *conversion.Cloner) error {
	out.Replicas = in.Replicas
	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:ysh7,项目名称:kubernetes,代码行数:13,代码来源:deep_copy_generated.go

示例9: DeepCopy_policy_PodDisruptionBudgetSpec

func DeepCopy_policy_PodDisruptionBudgetSpec(in PodDisruptionBudgetSpec, out *PodDisruptionBudgetSpec, c *conversion.Cloner) error {
	out.MinAvailable = in.MinAvailable
	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:apcera,项目名称:kubernetes,代码行数:13,代码来源:deep_copy_generated.go

示例10: DeepCopy_extensions_DaemonSetSpec

func DeepCopy_extensions_DaemonSetSpec(in DaemonSetSpec, out *DaemonSetSpec, c *conversion.Cloner) error {
	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
	}
	if err := api.DeepCopy_api_PodTemplateSpec(in.Template, &out.Template, c); err != nil {
		return err
	}
	return nil
}
开发者ID:ysh7,项目名称:kubernetes,代码行数:15,代码来源:deep_copy_generated.go

示例11: 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

示例12: DeepCopy_v1_ClusterResourceQuotaSpec

func DeepCopy_v1_ClusterResourceQuotaSpec(in ClusterResourceQuotaSpec, out *ClusterResourceQuotaSpec, c *conversion.Cloner) error {
	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
	}
	if err := api_v1.DeepCopy_v1_ResourceQuotaSpec(in.Quota, &out.Quota, c); err != nil {
		return err
	}
	return nil
}
开发者ID:sgallagher,项目名称:origin,代码行数:15,代码来源:deep_copy_generated.go

示例13: DeepCopy_batch_JobSpec

func DeepCopy_batch_JobSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
	{
		in := in.(*JobSpec)
		out := out.(*JobSpec)
		if in.Parallelism != nil {
			in, out := &in.Parallelism, &out.Parallelism
			*out = new(int32)
			**out = **in
		} else {
			out.Parallelism = nil
		}
		if in.Completions != nil {
			in, out := &in.Completions, &out.Completions
			*out = new(int32)
			**out = **in
		} else {
			out.Completions = nil
		}
		if in.ActiveDeadlineSeconds != nil {
			in, out := &in.ActiveDeadlineSeconds, &out.ActiveDeadlineSeconds
			*out = new(int64)
			**out = **in
		} else {
			out.ActiveDeadlineSeconds = nil
		}
		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
		}
		if in.ManualSelector != nil {
			in, out := &in.ManualSelector, &out.ManualSelector
			*out = new(bool)
			**out = **in
		} else {
			out.ManualSelector = nil
		}
		if err := api.DeepCopy_api_PodTemplateSpec(&in.Template, &out.Template, c); err != nil {
			return err
		}
		return nil
	}
}
开发者ID:ncdc,项目名称:kubernetes,代码行数:47,代码来源:zz_generated.deepcopy.go

示例14: DeepCopy_extensions_NetworkPolicySpec

func DeepCopy_extensions_NetworkPolicySpec(in NetworkPolicySpec, out *NetworkPolicySpec, c *conversion.Cloner) error {
	if err := unversioned.DeepCopy_unversioned_LabelSelector(in.PodSelector, &out.PodSelector, c); err != nil {
		return err
	}
	if in.Ingress != nil {
		in, out := in.Ingress, &out.Ingress
		*out = make([]NetworkPolicyIngressRule, len(in))
		for i := range in {
			if err := DeepCopy_extensions_NetworkPolicyIngressRule(in[i], &(*out)[i], c); err != nil {
				return err
			}
		}
	} else {
		out.Ingress = nil
	}
	return nil
}
开发者ID:40a,项目名称:bootkube,代码行数:17,代码来源:deep_copy_generated.go

示例15: DeepCopy_v1alpha1_PodDisruptionBudgetSpec

func DeepCopy_v1alpha1_PodDisruptionBudgetSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
	{
		in := in.(*PodDisruptionBudgetSpec)
		out := out.(*PodDisruptionBudgetSpec)
		out.MinAvailable = in.MinAvailable
		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:AdoHe,项目名称:kubernetes,代码行数:17,代码来源:zz_generated.deepcopy.go


注:本文中的k8s/io/kubernetes/pkg/api/unversioned.DeepCopy_unversioned_LabelSelector函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。