コード例 #1
0
ファイル: clientset.go プロジェクト: CodeJuan/kubernetes
// New creates a new Clientset for the given RESTClient.
func New(c *rest.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.DiscoveryClient = discovery.NewDiscoveryClient(c)
	return &clientset
}
コード例 #2
0
ファイル: clientset.go プロジェクト: juanluisvaladas/origin
// New creates a new Clientset for the given RESTClient.
func New(c *rest.RESTClient) *Clientset {
	var clientset Clientset
	clientset.CoreClient = v1core.New(c)
	clientset.AppsClient = v1alpha1apps.New(c)
	clientset.AuthenticationClient = v1beta1authentication.New(c)
	clientset.AuthorizationClient = v1beta1authorization.New(c)
	clientset.AutoscalingClient = v1autoscaling.New(c)
	clientset.BatchClient = v1batch.New(c)
	clientset.CertificatesClient = v1alpha1certificates.New(c)
	clientset.ExtensionsClient = v1beta1extensions.New(c)
	clientset.PolicyClient = v1alpha1policy.New(c)
	clientset.RbacClient = v1alpha1rbac.New(c)
	clientset.StorageClient = v1beta1storage.New(c)

	clientset.DiscoveryClient = discovery.NewDiscoveryClient(c)
	return &clientset
}