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


Golang testing.NewUpdateSubresourceAction函數代碼示例

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


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

示例1: UpdateStatus

func (c *FakeServices) UpdateStatus(service *v1.Service) (*v1.Service, error) {
	obj, err := c.Fake.
		Invokes(testing.NewUpdateSubresourceAction(servicesResource, "status", c.ns, service), &v1.Service{})

	if obj == nil {
		return nil, err
	}
	return obj.(*v1.Service), err
}
開發者ID:maisem,項目名稱:kubernetes,代碼行數:9,代碼來源:fake_service.go

示例2: UpdateStatus

func (c *FakeReplicaSets) UpdateStatus(replicaSet *v1beta1.ReplicaSet) (*v1beta1.ReplicaSet, error) {
	obj, err := c.Fake.
		Invokes(testing.NewUpdateSubresourceAction(replicasetsResource, "status", c.ns, replicaSet), &v1beta1.ReplicaSet{})

	if obj == nil {
		return nil, err
	}
	return obj.(*v1beta1.ReplicaSet), err
}
開發者ID:jbeda,項目名稱:kubernetes,代碼行數:9,代碼來源:fake_replicaset.go

示例3: UpdateStatus

func (c *FakeDeployments) UpdateStatus(deployment *v1beta1.Deployment) (*v1beta1.Deployment, error) {
	obj, err := c.Fake.
		Invokes(testing.NewUpdateSubresourceAction(deploymentsResource, "status", c.ns, deployment), &v1beta1.Deployment{})

	if obj == nil {
		return nil, err
	}
	return obj.(*v1beta1.Deployment), err
}
開發者ID:kubernetes,項目名稱:kubernetes,代碼行數:9,代碼來源:fake_deployment.go

示例4: UpdateStatus

func (c *FakeJobs) UpdateStatus(job *v2alpha1.Job) (*v2alpha1.Job, error) {
	obj, err := c.Fake.
		Invokes(testing.NewUpdateSubresourceAction(jobsResource, "status", c.ns, job), &v2alpha1.Job{})

	if obj == nil {
		return nil, err
	}
	return obj.(*v2alpha1.Job), err
}
開發者ID:alex-mohr,項目名稱:kubernetes,代碼行數:9,代碼來源:fake_job.go

示例5: UpdateStatus

func (c *FakeReplicationControllers) UpdateStatus(replicationController *v1.ReplicationController) (*v1.ReplicationController, error) {
	obj, err := c.Fake.
		Invokes(testing.NewUpdateSubresourceAction(replicationcontrollersResource, "status", c.ns, replicationController), &v1.ReplicationController{})

	if obj == nil {
		return nil, err
	}
	return obj.(*v1.ReplicationController), err
}
開發者ID:kubernetes,項目名稱:kubernetes,代碼行數:9,代碼來源:fake_replicationcontroller.go

示例6: UpdateStatus

func (c *FakePersistentVolumeClaims) UpdateStatus(persistentVolumeClaim *v1.PersistentVolumeClaim) (*v1.PersistentVolumeClaim, error) {
	obj, err := c.Fake.
		Invokes(testing.NewUpdateSubresourceAction(persistentvolumeclaimsResource, "status", c.ns, persistentVolumeClaim), &v1.PersistentVolumeClaim{})

	if obj == nil {
		return nil, err
	}
	return obj.(*v1.PersistentVolumeClaim), err
}
開發者ID:Q-Lee,項目名稱:kubernetes,代碼行數:9,代碼來源:fake_persistentvolumeclaim.go

示例7: UpdateStatus

func (c *FakePods) UpdateStatus(pod *v1.Pod) (*v1.Pod, error) {
	obj, err := c.Fake.
		Invokes(testing.NewUpdateSubresourceAction(podsResource, "status", c.ns, pod), &v1.Pod{})

	if obj == nil {
		return nil, err
	}
	return obj.(*v1.Pod), err
}
開發者ID:alex-mohr,項目名稱:kubernetes,代碼行數:9,代碼來源:fake_pod.go

示例8: UpdateStatus

func (c *FakeIngresses) UpdateStatus(ingress *v1beta1.Ingress) (*v1beta1.Ingress, error) {
	obj, err := c.Fake.
		Invokes(testing.NewUpdateSubresourceAction(ingressesResource, "status", c.ns, ingress), &v1beta1.Ingress{})

	if obj == nil {
		return nil, err
	}
	return obj.(*v1beta1.Ingress), err
}
開發者ID:Q-Lee,項目名稱:kubernetes,代碼行數:9,代碼來源:fake_ingress.go

示例9: UpdateStatus

func (c *FakeResourceQuotas) UpdateStatus(resourceQuota *v1.ResourceQuota) (*v1.ResourceQuota, error) {
	obj, err := c.Fake.
		Invokes(testing.NewUpdateSubresourceAction(resourcequotasResource, "status", c.ns, resourceQuota), &v1.ResourceQuota{})

	if obj == nil {
		return nil, err
	}
	return obj.(*v1.ResourceQuota), err
}
開發者ID:kubernetes,項目名稱:kubernetes,代碼行數:9,代碼來源:fake_resourcequota.go

示例10: UpdateStatus

func (c *FakeHorizontalPodAutoscalers) UpdateStatus(horizontalPodAutoscaler *v1.HorizontalPodAutoscaler) (*v1.HorizontalPodAutoscaler, error) {
	obj, err := c.Fake.
		Invokes(testing.NewUpdateSubresourceAction(horizontalpodautoscalersResource, "status", c.ns, horizontalPodAutoscaler), &v1.HorizontalPodAutoscaler{})

	if obj == nil {
		return nil, err
	}
	return obj.(*v1.HorizontalPodAutoscaler), err
}
開發者ID:maisem,項目名稱:kubernetes,代碼行數:9,代碼來源:fake_horizontalpodautoscaler.go

示例11: UpdateStatus

func (c *FakePodDisruptionBudgets) UpdateStatus(podDisruptionBudget *v1beta1.PodDisruptionBudget) (*v1beta1.PodDisruptionBudget, error) {
	obj, err := c.Fake.
		Invokes(testing.NewUpdateSubresourceAction(poddisruptionbudgetsResource, "status", c.ns, podDisruptionBudget), &v1beta1.PodDisruptionBudget{})

	if obj == nil {
		return nil, err
	}
	return obj.(*v1beta1.PodDisruptionBudget), err
}
開發者ID:eljefedelrodeodeljefe,項目名稱:kubernetes,代碼行數:9,代碼來源:fake_poddisruptionbudget.go


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