当前位置: 首页>>代码示例>>Golang>>正文


Golang discovery.NewDiscoveryClient函数代码示例

本文整理汇总了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
}
开发者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


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