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


Golang Scheme.AddTypeDefaultingFunc方法代碼示例

本文整理匯總了Golang中k8s/io/kubernetes/pkg/runtime.Scheme.AddTypeDefaultingFunc方法的典型用法代碼示例。如果您正苦於以下問題:Golang Scheme.AddTypeDefaultingFunc方法的具體用法?Golang Scheme.AddTypeDefaultingFunc怎麽用?Golang Scheme.AddTypeDefaultingFunc使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在k8s/io/kubernetes/pkg/runtime.Scheme的用法示例。


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

示例1: RegisterDefaults

// RegisterDefaults adds defaulters functions to the given scheme.
// Public to allow building arbitrary schemes.
// All generated defaulters are covering - they call all nested defaulters.
func RegisterDefaults(scheme *runtime.Scheme) error {
	scheme.AddTypeDefaultingFunc(&HorizontalPodAutoscaler{}, func(obj interface{}) { SetObjectDefaults_HorizontalPodAutoscaler(obj.(*HorizontalPodAutoscaler)) })
	scheme.AddTypeDefaultingFunc(&HorizontalPodAutoscalerList{}, func(obj interface{}) {
		SetObjectDefaults_HorizontalPodAutoscalerList(obj.(*HorizontalPodAutoscalerList))
	})
	return nil
}
開發者ID:eljefedelrodeodeljefe,項目名稱:kubernetes,代碼行數:10,代碼來源:zz_generated.defaults.go

示例2: RegisterDefaults

// RegisterDefaults adds defaulters functions to the given scheme.
// Public to allow building arbitrary schemes.
// All generated defaulters are covering - they call all nested defaulters.
func RegisterDefaults(scheme *runtime.Scheme) error {
	scheme.AddTypeDefaultingFunc(&Job{}, func(obj interface{}) { SetObjectDefaults_Job(obj.(*Job)) })
	scheme.AddTypeDefaultingFunc(&JobList{}, func(obj interface{}) { SetObjectDefaults_JobList(obj.(*JobList)) })
	scheme.AddTypeDefaultingFunc(&JobTemplate{}, func(obj interface{}) { SetObjectDefaults_JobTemplate(obj.(*JobTemplate)) })
	scheme.AddTypeDefaultingFunc(&ScheduledJob{}, func(obj interface{}) { SetObjectDefaults_ScheduledJob(obj.(*ScheduledJob)) })
	scheme.AddTypeDefaultingFunc(&ScheduledJobList{}, func(obj interface{}) { SetObjectDefaults_ScheduledJobList(obj.(*ScheduledJobList)) })
	return nil
}
開發者ID:upmc-enterprises,項目名稱:kubernetes,代碼行數:11,代碼來源:zz_generated.defaults.go

示例3: RegisterDefaults

// RegisterDefaults adds defaulters functions to the given scheme.
// Public to allow building arbitrary schemes.
// All generated defaulters are covering - they call all nested defaulters.
func RegisterDefaults(scheme *runtime.Scheme) error {
	scheme.AddTypeDefaultingFunc(&ImageStream{}, func(obj interface{}) { SetObjectDefaults_ImageStream(obj.(*ImageStream)) })
	scheme.AddTypeDefaultingFunc(&ImageStreamImport{}, func(obj interface{}) { SetObjectDefaults_ImageStreamImport(obj.(*ImageStreamImport)) })
	scheme.AddTypeDefaultingFunc(&ImageStreamList{}, func(obj interface{}) { SetObjectDefaults_ImageStreamList(obj.(*ImageStreamList)) })
	scheme.AddTypeDefaultingFunc(&ImageStreamTag{}, func(obj interface{}) { SetObjectDefaults_ImageStreamTag(obj.(*ImageStreamTag)) })
	scheme.AddTypeDefaultingFunc(&ImageStreamTagList{}, func(obj interface{}) { SetObjectDefaults_ImageStreamTagList(obj.(*ImageStreamTagList)) })
	return nil
}
開發者ID:xgwang-zte,項目名稱:origin,代碼行數:11,代碼來源:zz_generated.defaults.go

示例4: RegisterDefaults

// RegisterDefaults adds defaulters functions to the given scheme.
// Public to allow building arbitrary schemes.
// All generated defaulters are covering - they call all nested defaulters.
func RegisterDefaults(scheme *runtime.Scheme) error {
	scheme.AddTypeDefaultingFunc(&Build{}, func(obj interface{}) { SetObjectDefaults_Build(obj.(*Build)) })
	scheme.AddTypeDefaultingFunc(&BuildConfig{}, func(obj interface{}) { SetObjectDefaults_BuildConfig(obj.(*BuildConfig)) })
	scheme.AddTypeDefaultingFunc(&BuildConfigList{}, func(obj interface{}) { SetObjectDefaults_BuildConfigList(obj.(*BuildConfigList)) })
	scheme.AddTypeDefaultingFunc(&BuildList{}, func(obj interface{}) { SetObjectDefaults_BuildList(obj.(*BuildList)) })
	scheme.AddTypeDefaultingFunc(&BuildRequest{}, func(obj interface{}) { SetObjectDefaults_BuildRequest(obj.(*BuildRequest)) })
	return nil
}
開發者ID:xgwang-zte,項目名稱:origin,代碼行數:11,代碼來源:zz_generated.defaults.go

示例5: RegisterDefaults

// RegisterDefaults adds defaulters functions to the given scheme.
// Public to allow building arbitrary schemes.
// All generated defaulters are covering - they call all nested defaulters.
func RegisterDefaults(scheme *runtime.Scheme) error {
	scheme.AddTypeDefaultingFunc(&ClusterRoleBinding{}, func(obj interface{}) { SetObjectDefaults_ClusterRoleBinding(obj.(*ClusterRoleBinding)) })
	scheme.AddTypeDefaultingFunc(&ClusterRoleBindingList{}, func(obj interface{}) { SetObjectDefaults_ClusterRoleBindingList(obj.(*ClusterRoleBindingList)) })
	scheme.AddTypeDefaultingFunc(&RoleBinding{}, func(obj interface{}) { SetObjectDefaults_RoleBinding(obj.(*RoleBinding)) })
	scheme.AddTypeDefaultingFunc(&RoleBindingList{}, func(obj interface{}) { SetObjectDefaults_RoleBindingList(obj.(*RoleBindingList)) })
	return nil
}
開發者ID:Q-Lee,項目名稱:kubernetes,代碼行數:10,代碼來源:zz_generated.defaults.go

示例6: RegisterDefaults

// RegisterDefaults adds defaulters functions to the given scheme.
// Public to allow building arbitrary schemes.
// All generated defaulters are covering - they call all nested defaulters.
func RegisterDefaults(scheme *runtime.Scheme) error {
	scheme.AddTypeDefaultingFunc(&PodSecurityPolicyReview{}, func(obj interface{}) { SetObjectDefaults_PodSecurityPolicyReview(obj.(*PodSecurityPolicyReview)) })
	scheme.AddTypeDefaultingFunc(&PodSecurityPolicySelfSubjectReview{}, func(obj interface{}) {
		SetObjectDefaults_PodSecurityPolicySelfSubjectReview(obj.(*PodSecurityPolicySelfSubjectReview))
	})
	scheme.AddTypeDefaultingFunc(&PodSecurityPolicySubjectReview{}, func(obj interface{}) {
		SetObjectDefaults_PodSecurityPolicySubjectReview(obj.(*PodSecurityPolicySubjectReview))
	})
	return nil
}
開發者ID:xgwang-zte,項目名稱:origin,代碼行數:13,代碼來源:zz_generated.defaults.go

示例7: RegisterDefaults

// RegisterDefaults adds defaulters functions to the given scheme.
// Public to allow building arbitrary schemes.
// All generated defaulters are covering - they call all nested defaulters.
func RegisterDefaults(scheme *runtime.Scheme) error {
	scheme.AddTypeDefaultingFunc(&MasterConfiguration{}, func(obj interface{}) { SetObjectDefaults_MasterConfiguration(obj.(*MasterConfiguration)) })
	scheme.AddTypeDefaultingFunc(&NodeConfiguration{}, func(obj interface{}) { SetObjectDefaults_NodeConfiguration(obj.(*NodeConfiguration)) })
	return nil
}
開發者ID:ConnorDoyle,項目名稱:kubernetes,代碼行數:8,代碼來源:zz_generated.defaults.go

示例8: RegisterDefaults

// RegisterDefaults adds defaulters functions to the given scheme.
// Public to allow building arbitrary schemes.
// All generated defaulters are covering - they call all nested defaulters.
func RegisterDefaults(scheme *runtime.Scheme) error {
	scheme.AddTypeDefaultingFunc(&DaemonSet{}, func(obj interface{}) { SetObjectDefaults_DaemonSet(obj.(*DaemonSet)) })
	scheme.AddTypeDefaultingFunc(&DaemonSetList{}, func(obj interface{}) { SetObjectDefaults_DaemonSetList(obj.(*DaemonSetList)) })
	scheme.AddTypeDefaultingFunc(&Deployment{}, func(obj interface{}) { SetObjectDefaults_Deployment(obj.(*Deployment)) })
	scheme.AddTypeDefaultingFunc(&DeploymentList{}, func(obj interface{}) { SetObjectDefaults_DeploymentList(obj.(*DeploymentList)) })
	scheme.AddTypeDefaultingFunc(&HorizontalPodAutoscaler{}, func(obj interface{}) { SetObjectDefaults_HorizontalPodAutoscaler(obj.(*HorizontalPodAutoscaler)) })
	scheme.AddTypeDefaultingFunc(&HorizontalPodAutoscalerList{}, func(obj interface{}) {
		SetObjectDefaults_HorizontalPodAutoscalerList(obj.(*HorizontalPodAutoscalerList))
	})
	scheme.AddTypeDefaultingFunc(&Job{}, func(obj interface{}) { SetObjectDefaults_Job(obj.(*Job)) })
	scheme.AddTypeDefaultingFunc(&JobList{}, func(obj interface{}) { SetObjectDefaults_JobList(obj.(*JobList)) })
	scheme.AddTypeDefaultingFunc(&NetworkPolicy{}, func(obj interface{}) { SetObjectDefaults_NetworkPolicy(obj.(*NetworkPolicy)) })
	scheme.AddTypeDefaultingFunc(&NetworkPolicyList{}, func(obj interface{}) { SetObjectDefaults_NetworkPolicyList(obj.(*NetworkPolicyList)) })
	scheme.AddTypeDefaultingFunc(&ReplicaSet{}, func(obj interface{}) { SetObjectDefaults_ReplicaSet(obj.(*ReplicaSet)) })
	scheme.AddTypeDefaultingFunc(&ReplicaSetList{}, func(obj interface{}) { SetObjectDefaults_ReplicaSetList(obj.(*ReplicaSetList)) })
	return nil
}
開發者ID:eljefedelrodeodeljefe,項目名稱:kubernetes,代碼行數:20,代碼來源:zz_generated.defaults.go

示例9: RegisterDefaults

// RegisterDefaults adds defaulters functions to the given scheme.
// Public to allow building arbitrary schemes.
// All generated defaulters are covering - they call all nested defaulters.
func RegisterDefaults(scheme *runtime.Scheme) error {
	scheme.AddTypeDefaultingFunc(&DeploymentConfig{}, func(obj interface{}) { SetObjectDefaults_DeploymentConfig(obj.(*DeploymentConfig)) })
	scheme.AddTypeDefaultingFunc(&DeploymentConfigList{}, func(obj interface{}) { SetObjectDefaults_DeploymentConfigList(obj.(*DeploymentConfigList)) })
	return nil
}
開發者ID:xgwang-zte,項目名稱:origin,代碼行數:8,代碼來源:zz_generated.defaults.go

示例10: RegisterDefaults

// RegisterDefaults adds defaulters functions to the given scheme.
// Public to allow building arbitrary schemes.
// All generated defaulters are covering - they call all nested defaulters.
func RegisterDefaults(scheme *runtime.Scheme) error {
	scheme.AddTypeDefaultingFunc(&KubeProxyConfiguration{}, func(obj interface{}) { SetObjectDefaults_KubeProxyConfiguration(obj.(*KubeProxyConfiguration)) })
	scheme.AddTypeDefaultingFunc(&KubeSchedulerConfiguration{}, func(obj interface{}) { SetObjectDefaults_KubeSchedulerConfiguration(obj.(*KubeSchedulerConfiguration)) })
	scheme.AddTypeDefaultingFunc(&KubeletConfiguration{}, func(obj interface{}) { SetObjectDefaults_KubeletConfiguration(obj.(*KubeletConfiguration)) })
	return nil
}
開發者ID:eljefedelrodeodeljefe,項目名稱:kubernetes,代碼行數:9,代碼來源:zz_generated.defaults.go


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