本文整理匯總了Golang中k8s/io/kubernetes/pkg/api.LoadBalancerStatus類的典型用法代碼示例。如果您正苦於以下問題:Golang LoadBalancerStatus類的具體用法?Golang LoadBalancerStatus怎麽用?Golang LoadBalancerStatus使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了LoadBalancerStatus類的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1: buildServiceStatus
func buildServiceStatus(ingresses [][]string) api.LoadBalancerStatus {
status := api.LoadBalancerStatus{
Ingress: []api.LoadBalancerIngress{},
}
for _, element := range ingresses {
ingress := api.LoadBalancerIngress{IP: element[0], Hostname: element[1]}
status.Ingress = append(status.Ingress, ingress)
}
return status
}
示例2: deepCopy_api_LoadBalancerStatus
func deepCopy_api_LoadBalancerStatus(in api.LoadBalancerStatus, out *api.LoadBalancerStatus, c *conversion.Cloner) error {
if in.Ingress != nil {
out.Ingress = make([]api.LoadBalancerIngress, len(in.Ingress))
for i := range in.Ingress {
if err := deepCopy_api_LoadBalancerIngress(in.Ingress[i], &out.Ingress[i], c); err != nil {
return err
}
}
} else {
out.Ingress = nil
}
return nil
}