本文整理汇总了Golang中k8s/io/kubernetes/federation/apis/federation.ClusterSpec.SecretRef方法的典型用法代码示例。如果您正苦于以下问题:Golang ClusterSpec.SecretRef方法的具体用法?Golang ClusterSpec.SecretRef怎么用?Golang ClusterSpec.SecretRef使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类k8s/io/kubernetes/federation/apis/federation.ClusterSpec
的用法示例。
在下文中一共展示了ClusterSpec.SecretRef方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1: autoConvert_v1beta1_ClusterSpec_To_federation_ClusterSpec
func autoConvert_v1beta1_ClusterSpec_To_federation_ClusterSpec(in *ClusterSpec, out *federation.ClusterSpec, s conversion.Scope) error {
if in.ServerAddressByClientCIDRs != nil {
in, out := &in.ServerAddressByClientCIDRs, &out.ServerAddressByClientCIDRs
*out = make([]federation.ServerAddressByClientCIDR, len(*in))
for i := range *in {
if err := Convert_v1beta1_ServerAddressByClientCIDR_To_federation_ServerAddressByClientCIDR(&(*in)[i], &(*out)[i], s); err != nil {
return err
}
}
} else {
out.ServerAddressByClientCIDRs = nil
}
if in.SecretRef != nil {
in, out := &in.SecretRef, &out.SecretRef
*out = new(api.LocalObjectReference)
// TODO: Inefficient conversion - can we improve it?
if err := s.Convert(*in, *out, 0); err != nil {
return err
}
} else {
out.SecretRef = nil
}
return nil
}
示例2: autoConvert_v1beta1_ClusterSpec_To_federation_ClusterSpec
func autoConvert_v1beta1_ClusterSpec_To_federation_ClusterSpec(in *ClusterSpec, out *federation.ClusterSpec, s conversion.Scope) error {
out.ServerAddressByClientCIDRs = *(*[]federation.ServerAddressByClientCIDR)(unsafe.Pointer(&in.ServerAddressByClientCIDRs))
out.SecretRef = (*api.LocalObjectReference)(unsafe.Pointer(in.SecretRef))
return nil
}