當前位置: 首頁>>代碼示例>>Golang>>正文


Golang core.NewRootUpdateSubresourceAction函數代碼示例

本文整理匯總了Golang中k8s/io/kubernetes/pkg/client/testing/core.NewRootUpdateSubresourceAction函數的典型用法代碼示例。如果您正苦於以下問題:Golang NewRootUpdateSubresourceAction函數的具體用法?Golang NewRootUpdateSubresourceAction怎麽用?Golang NewRootUpdateSubresourceAction使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了NewRootUpdateSubresourceAction函數的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。

示例1: UpdateStatus

func (c *FakeNamespaces) UpdateStatus(namespace *v1.Namespace) (*v1.Namespace, error) {
	obj, err := c.Fake.
		Invokes(core.NewRootUpdateSubresourceAction(namespacesResource, "status", namespace), &v1.Namespace{})
	if obj == nil {
		return nil, err
	}
	return obj.(*v1.Namespace), err
}
開發者ID:CodeJuan,項目名稱:kubernetes,代碼行數:8,代碼來源:fake_namespace.go

示例2: UpdateStatus

func (c *FakeCertificateSigningRequests) UpdateStatus(certificateSigningRequest *certificates.CertificateSigningRequest) (*certificates.CertificateSigningRequest, error) {
	obj, err := c.Fake.
		Invokes(core.NewRootUpdateSubresourceAction(certificatesigningrequestsResource, "status", certificateSigningRequest), &certificates.CertificateSigningRequest{})
	if obj == nil {
		return nil, err
	}
	return obj.(*certificates.CertificateSigningRequest), err
}
開發者ID:humblec,項目名稱:kubernetes,代碼行數:8,代碼來源:fake_certificatesigningrequest.go

示例3: UpdateStatus

func (c *FakeClusters) UpdateStatus(cluster *federation.Cluster) (*federation.Cluster, error) {
	obj, err := c.Fake.
		Invokes(core.NewRootUpdateSubresourceAction(clustersResource, "status", cluster), &federation.Cluster{})
	if obj == nil {
		return nil, err
	}
	return obj.(*federation.Cluster), err
}
開發者ID:Clarifai,項目名稱:kubernetes,代碼行數:8,代碼來源:fake_cluster.go

示例4: UpdateStatus

func (c *FakePersistentVolumes) UpdateStatus(persistentVolume *v1.PersistentVolume) (*v1.PersistentVolume, error) {
	obj, err := c.Fake.
		Invokes(core.NewRootUpdateSubresourceAction(persistentvolumesResource, "status", persistentVolume), &v1.PersistentVolume{})
	if obj == nil {
		return nil, err
	}
	return obj.(*v1.PersistentVolume), err
}
開發者ID:alex-mohr,項目名稱:kubernetes,代碼行數:8,代碼來源:fake_persistentvolume.go

示例5: UpdateStatus

func (c *FakeNodes) UpdateStatus(node *api.Node) (*api.Node, error) {
	obj, err := c.Fake.
		Invokes(core.NewRootUpdateSubresourceAction("nodes", "status", node), &api.Node{})
	if obj == nil {
		return nil, err
	}
	return obj.(*api.Node), err
}
開發者ID:XiaoningDing,項目名稱:UbernetesPOC,代碼行數:8,代碼來源:fake_node.go

示例6: UpdateStatus

func (c *FakeAPIServices) UpdateStatus(aPIService *apiregistration.APIService) (*apiregistration.APIService, error) {
	obj, err := c.Fake.
		Invokes(core.NewRootUpdateSubresourceAction(apiservicesResource, "status", aPIService), &apiregistration.APIService{})
	if obj == nil {
		return nil, err
	}
	return obj.(*apiregistration.APIService), err
}
開發者ID:kubernetes,項目名稱:kubernetes,代碼行數:8,代碼來源:fake_apiservice.go

示例7: UpdateStatus

func (c *FakeNetworks) UpdateStatus(network *api.Network) (*api.Network, error) {
	obj, err := c.Fake.
		Invokes(core.NewRootUpdateSubresourceAction("networks", "status", network), &api.Network{})
	if obj == nil {
		return nil, err
	}
	return obj.(*api.Network), err
}
開發者ID:thed00de,項目名稱:hypernetes,代碼行數:8,代碼來源:fake_network.go

示例8: UpdateStatus

func (c *FakeProjects) UpdateStatus(project *v1.Project) (*v1.Project, error) {
	obj, err := c.Fake.
		Invokes(core.NewRootUpdateSubresourceAction(projectsResource, "status", project), &v1.Project{})
	if obj == nil {
		return nil, err
	}
	return obj.(*v1.Project), err
}
開發者ID:juanluisvaladas,項目名稱:origin,代碼行數:8,代碼來源:fake_project.go


注:本文中的k8s/io/kubernetes/pkg/client/testing/core.NewRootUpdateSubresourceAction函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。