• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Golang discovery.NewDiscoveryClient函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Golang中k8s/io/kubernetes/pkg/client/typed/discovery.NewDiscoveryClient函数的典型用法代码示例。如果您正苦于以下问题:Golang NewDiscoveryClient函数的具体用法?Golang NewDiscoveryClient怎么用?Golang NewDiscoveryClient使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了NewDiscoveryClient函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
}
开发者ID:RyanBinfeng,项目名称:kubernetes,代码行数:33,代码来源:clientset_adaption.go


示例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
}
开发者ID:Xmagicer,项目名称:origin,代码行数:8,代码来源:clientset.go


示例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
}
开发者ID:Clarifai,项目名称:kubernetes,代码行数:8,代码来源:clientset.go


示例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
}
开发者ID:jwforres,项目名称:origin,代码行数:8,代码来源:clientset.go


示例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
}
开发者ID:kubernetes,项目名称:kubernetes,代码行数:8,代码来源:clientset.go


示例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
}
开发者ID:kubernetes,项目名称:kubernetes,代码行数:8,代码来源:clientset.go


示例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
}
开发者ID:xgwang-zte,项目名称:origin,代码行数:8,代码来源:clientset.go


示例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
}
开发者ID:xgwang-zte,项目名称:origin,代码行数:8,代码来源:clientset.go


示例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
}
开发者ID:CodeJuan,项目名称:kubernetes,代码行数:9,代码来源:clientset.go


示例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
}
开发者ID:CodeJuan,项目名称:kubernetes,代码行数:9,代码来源:clientset.go


示例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
}
开发者ID:Clarifai,项目名称:kubernetes,代码行数:10,代码来源:clientset.go


示例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
}
开发者ID:nak3,项目名称:kubernetes,代码行数:10,代码来源:clientset.go


示例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
}
开发者ID:kubernetes,项目名称:kubernetes,代码行数:11,代码来源:clientset.go


示例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
}
开发者ID:RyanBinfeng,项目名称:kubernetes,代码行数:11,代码来源:clientset.go


示例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
}
开发者ID:gtank,项目名称:kubernetes,代码行数:13,代码来源:clientset.go


示例16: FromUnversionedClient

// FromUnversionedClient adapts a pkg/client/unversioned#Client to a 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) *Clientset {
	var clientset Clientset
	if c != nil {
		clientset.CoreClient = v1core.New(c.RESTClient)
	} else {
		clientset.CoreClient = v1core.New(nil)
	}
	if c != nil && c.ExtensionsClient != nil {
		clientset.ExtensionsClient = v1beta1extensions.New(c.ExtensionsClient.RESTClient)
	} else {
		clientset.ExtensionsClient = v1beta1extensions.New(nil)
	}

	if c != nil && c.DiscoveryClient != nil {
		clientset.DiscoveryClient = discovery.NewDiscoveryClient(c.DiscoveryClient.RESTClient)
	} else {
		clientset.DiscoveryClient = discovery.NewDiscoveryClient(nil)
	}

	return &clientset
}
开发者ID:mataihang,项目名称:kubernetes,代码行数:24,代码来源:clientset_adaption.go


示例17: 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.AuthorizationClient = v1beta1authorization.New(c)
	clientset.AutoscalingClient = v1autoscaling.New(c)
	clientset.BatchClient = v1batch.New(c)
	clientset.ExtensionsClient = v1beta1extensions.New(c)
	clientset.PolicyClient = v1alpha1policy.New(c)
	clientset.StorageClient = v1beta1storage.New(c)

	clientset.DiscoveryClient = discovery.NewDiscoveryClient(c)
	return &clientset
}
开发者ID:PeterLamar,项目名称:kubernetes,代码行数:14,代码来源:clientset.go


示例18: New

// New creates a new Clientset for the given RESTClient.
func New(c restclient.Interface) *Clientset {
	var cs Clientset
	cs.CoreClient = internalversioncore.New(c)
	cs.AppsClient = internalversionapps.New(c)
	cs.AuthenticationClient = internalversionauthentication.New(c)
	cs.AuthorizationClient = internalversionauthorization.New(c)
	cs.AutoscalingClient = internalversionautoscaling.New(c)
	cs.BatchClient = internalversionbatch.New(c)
	cs.CertificatesClient = internalversioncertificates.New(c)
	cs.ExtensionsClient = internalversionextensions.New(c)
	cs.PolicyClient = internalversionpolicy.New(c)
	cs.RbacClient = internalversionrbac.New(c)
	cs.StorageClient = internalversionstorage.New(c)

	cs.DiscoveryClient = discovery.NewDiscoveryClient(c)
	return &cs
}
开发者ID:johscheuer,项目名称:kubernetes,代码行数:18,代码来源:clientset.go


示例19: NewDiscoveryClient

// New creates a new DiscoveryClient for the given RESTClient.
func NewDiscoveryClient(c *restclient.RESTClient) *DiscoveryClient {
	return &DiscoveryClient{discovery.NewDiscoveryClient(c)}
}
开发者ID:rhamilto,项目名称:origin,代码行数:4,代码来源:discovery.go


示例20: NewDiscoveryClient

// New creates a new DiscoveryClient for the given RESTClient.
func NewDiscoveryClient(c restclient.Interface) *DiscoveryClient {
	return &DiscoveryClient{discovery.NewDiscoveryClient(c)}
}
开发者ID:xgwang-zte,项目名称:origin,代码行数:4,代码来源:discovery.go



注:本文中的k8s/io/kubernetes/pkg/client/typed/discovery.NewDiscoveryClient函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Golang discovery.NewDiscoveryClientForConfig函数代码示例发布时间:2022-05-28
下一篇:
Golang transport.TLSConfigFor函数代码示例发布时间:2022-05-28
热门推荐
热门话题
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap