本文整理匯總了Golang中k8s/io/kubernetes/federation/apis/federation.ClusterStatus類的典型用法代碼示例。如果您正苦於以下問題:Golang ClusterStatus類的具體用法?Golang ClusterStatus怎麽用?Golang ClusterStatus使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了ClusterStatus類的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1: autoConvert_v1alpha1_ClusterStatus_To_federation_ClusterStatus
func autoConvert_v1alpha1_ClusterStatus_To_federation_ClusterStatus(in *ClusterStatus, out *federation.ClusterStatus, s conversion.Scope) error {
if in.Conditions != nil {
in, out := &in.Conditions, &out.Conditions
*out = make([]federation.ClusterCondition, len(*in))
for i := range *in {
if err := Convert_v1alpha1_ClusterCondition_To_federation_ClusterCondition(&(*in)[i], &(*out)[i], s); err != nil {
return err
}
}
} else {
out.Conditions = nil
}
if err := v1.Convert_v1_ResourceList_To_api_ResourceList(&in.Capacity, &out.Capacity, s); err != nil {
return err
}
if err := v1.Convert_v1_ResourceList_To_api_ResourceList(&in.Allocatable, &out.Allocatable, s); err != nil {
return err
}
if err := Convert_v1alpha1_ClusterMeta_To_federation_ClusterMeta(&in.ClusterMeta, &out.ClusterMeta, s); err != nil {
return err
}
out.Zones = in.Zones
out.Region = in.Region
return nil
}
示例2: autoConvert_v1beta1_ClusterStatus_To_federation_ClusterStatus
func autoConvert_v1beta1_ClusterStatus_To_federation_ClusterStatus(in *ClusterStatus, out *federation.ClusterStatus, s conversion.Scope) error {
if in.Conditions != nil {
in, out := &in.Conditions, &out.Conditions
*out = make([]federation.ClusterCondition, len(*in))
for i := range *in {
if err := Convert_v1beta1_ClusterCondition_To_federation_ClusterCondition(&(*in)[i], &(*out)[i], s); err != nil {
return err
}
}
} else {
out.Conditions = nil
}
out.Zones = in.Zones
out.Region = in.Region
return nil
}
示例3: autoConvert_v1alpha1_ClusterStatus_To_federation_ClusterStatus
func autoConvert_v1alpha1_ClusterStatus_To_federation_ClusterStatus(in *ClusterStatus, out *federation.ClusterStatus, s conversion.Scope) error {
if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
defaulting.(func(*ClusterStatus))(in)
}
if in.Conditions != nil {
in, out := &in.Conditions, &out.Conditions
*out = make([]federation.ClusterCondition, len(*in))
for i := range *in {
if err := Convert_v1alpha1_ClusterCondition_To_federation_ClusterCondition(&(*in)[i], &(*out)[i], s); err != nil {
return err
}
}
} else {
out.Conditions = nil
}
if err := v1.Convert_v1_ResourceList_To_api_ResourceList(&in.Capacity, &out.Capacity, s); err != nil {
return err
}
if err := v1.Convert_v1_ResourceList_To_api_ResourceList(&in.Allocatable, &out.Allocatable, s); err != nil {
return err
}
if err := Convert_v1alpha1_ClusterMeta_To_federation_ClusterMeta(&in.ClusterMeta, &out.ClusterMeta, s); err != nil {
return err
}
return nil
}
示例4: autoConvert_v1beta1_ClusterStatus_To_federation_ClusterStatus
func autoConvert_v1beta1_ClusterStatus_To_federation_ClusterStatus(in *ClusterStatus, out *federation.ClusterStatus, s conversion.Scope) error {
out.Conditions = *(*[]federation.ClusterCondition)(unsafe.Pointer(&in.Conditions))
out.Zones = *(*[]string)(unsafe.Pointer(&in.Zones))
out.Region = in.Region
return nil
}