本文整理汇总了Golang中k8s/io/kubernetes/pkg/client/typed/discovery.NewDiscoveryClient函数的典型用法代码示例。如果您正苦于以下问题:Golang NewDiscoveryClient函数的具体用法?Golang NewDiscoveryClient怎么用?Golang NewDiscoveryClient使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了NewDiscoveryClient函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1: FromUnversionedClient
// FromUnversionedClient adapts a unversioned.Client to a internalclientset.Clientset.
// This function is temporary. We will remove it when everyone has moved to using
// Clientset. New code should NOT use this function.
func FromUnversionedClient(c *unversioned.Client) *internalclientset.Clientset {
var clientset internalclientset.Clientset
if c != nil {
clientset.CoreClient = unversionedcore.New(c.RESTClient)
} else {
clientset.CoreClient = unversionedcore.New(nil)
}
if c != nil && c.ExtensionsClient != nil {
clientset.ExtensionsClient = unversionedextensions.New(c.ExtensionsClient.RESTClient)
} else {
clientset.ExtensionsClient = unversionedextensions.New(nil)
}
if c != nil && c.BatchClient != nil {
clientset.BatchClient = unversionedbatch.New(c.BatchClient.RESTClient)
} else {
clientset.BatchClient = unversionedbatch.New(nil)
}
if c != nil && c.AutoscalingClient != nil {
clientset.AutoscalingClient = unversionedautoscaling.New(c.AutoscalingClient.RESTClient)
} else {
clientset.AutoscalingClient = unversionedautoscaling.New(nil)
}
if c != nil && c.DiscoveryClient != nil {
clientset.DiscoveryClient = discovery.NewDiscoveryClient(c.DiscoveryClient.RESTClient)
} else {
clientset.DiscoveryClient = discovery.NewDiscoveryClient(nil)
}
return &clientset
}
示例2: New
// New creates a new Clientset for the given RESTClient.
func New(c *restclient.RESTClient) *Clientset {
var clientset Clientset
clientset.CoreClient = unversionedcore.New(c)
clientset.DiscoveryClient = discovery.NewDiscoveryClient(c)
return &clientset
}
示例3: New
// New creates a new Clientset for the given RESTClient.
func New(c *restclient.RESTClient) *Clientset {
var clientset Clientset
clientset.FederationClient = unversionedfederation.New(c)
clientset.DiscoveryClient = discovery.NewDiscoveryClient(c)
return &clientset
}
示例4: New
// New creates a new Clientset for the given RESTClient.
func New(c *restclient.RESTClient) *Clientset {
var clientset Clientset
clientset.TestgroupClient = unversionedtestgroup.New(c)
clientset.DiscoveryClient = discovery.NewDiscoveryClient(c)
return &clientset
}
示例5: New
// New creates a new Clientset for the given RESTClient.
func New(c restclient.Interface) *Clientset {
var cs Clientset
cs.ApiregistrationV1alpha1Client = v1alpha1apiregistration.New(c)
cs.DiscoveryClient = discovery.NewDiscoveryClient(c)
return &cs
}
示例6: New
// New creates a new Clientset for the given RESTClient.
func New(c restclient.Interface) *Clientset {
var cs Clientset
cs.TestgroupClient = internalversiontestgroup.New(c)
cs.DiscoveryClient = discovery.NewDiscoveryClient(c)
return &cs
}
示例7: New
// New creates a new Clientset for the given RESTClient.
func New(c restclient.Interface) *Clientset {
var clientset Clientset
clientset.CoreV1Client = v1core.New(c)
clientset.DiscoveryClient = discovery.NewDiscoveryClient(c)
return &clientset
}
示例8: New
// New creates a new Clientset for the given RESTClient.
func New(c restclient.Interface) *Clientset {
var clientset Clientset
clientset.CoreClient = internalversioncore.New(c)
clientset.DiscoveryClient = discovery.NewDiscoveryClient(c)
return &clientset
}
示例9: New
// New creates a new Clientset for the given RESTClient.
func New(c *restclient.RESTClient) *Clientset {
var clientset Clientset
clientset.FederationClient = v1beta1federation.New(c)
clientset.CoreClient = v1core.New(c)
clientset.DiscoveryClient = discovery.NewDiscoveryClient(c)
return &clientset
}
示例10: New
// New creates a new Clientset for the given RESTClient.
func New(c *restclient.RESTClient) *Clientset {
var clientset Clientset
clientset.CoreClient = v1core.New(c)
clientset.ExtensionsClient = v1beta1extensions.New(c)
clientset.DiscoveryClient = discovery.NewDiscoveryClient(c)
return &clientset
}
示例11: New
// New creates a new Clientset for the given RESTClient.
func New(c *restclient.RESTClient) *Clientset {
var clientset Clientset
clientset.CoreClient = unversionedcore.New(c)
clientset.ExtensionsClient = unversionedextensions.New(c)
clientset.BatchClient = unversionedbatch.New(c)
clientset.DiscoveryClient = discovery.NewDiscoveryClient(c)
return &clientset
}
示例12: New
// New creates a new Clientset for the given RESTClient.
func New(c restclient.Interface) *Clientset {
var clientset Clientset
clientset.CoreV1Client = v1core.New(c)
clientset.ExtensionsV1beta1Client = v1beta1extensions.New(c)
clientset.FederationV1beta1Client = v1beta1federation.New(c)
clientset.DiscoveryClient = discovery.NewDiscoveryClient(c)
return &clientset
}
示例13: New
// New creates a new Clientset for the given RESTClient.
func New(c restclient.Interface) *Clientset {
var cs Clientset
cs.CoreV1Client = v1core.New(c)
cs.BatchV1Client = v1batch.New(c)
cs.ExtensionsV1beta1Client = v1beta1extensions.New(c)
cs.FederationV1beta1Client = v1beta1federation.New(c)
cs.DiscoveryClient = discovery.NewDiscoveryClient(c)
return &cs
}
示例14: New
// New creates a new Clientset for the given RESTClient.
func New(c *restclient.RESTClient) *Clientset {
var clientset Clientset
clientset.CoreClient = v1core.New(c)
clientset.ExtensionsClient = v1beta1extensions.New(c)
clientset.AutoscalingClient = v1autoscaling.New(c)
clientset.BatchClient = v1batch.New(c)
clientset.DiscoveryClient = discovery.NewDiscoveryClient(c)
return &clientset
}
示例15: New
// New creates a new Clientset for the given RESTClient.
func New(c *restclient.RESTClient) *Clientset {
var clientset Clientset
clientset.CoreClient = unversionedcore.New(c)
clientset.ExtensionsClient = unversionedextensions.New(c)
clientset.AutoscalingClient = unversionedautoscaling.New(c)
clientset.BatchClient = unversionedbatch.New(c)
clientset.RbacClient = unversionedrbac.New(c)
clientset.CertificatesClient = unversionedcertificates.New(c)
clientset.DiscoveryClient = discovery.NewDiscoveryClient(c)
return &clientset
}