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


Golang core.NewPatchAction函數代碼示例

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


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

示例1: Patch

// Patch applies the patch and returns the patched pod.
func (c *FakePods) Patch(name string, pt api.PatchType, data []byte) (result *api.Pod, err error) {
	obj, err := c.Fake.
		Invokes(core.NewPatchAction(podsResource, c.ns, name, data), &api.Pod{})

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

示例2: Patch

// Patch applies the patch and returns the patched service.
func (c *FakeServices) Patch(name string, pt api.PatchType, data []byte) (result *v1.Service, err error) {
	obj, err := c.Fake.
		Invokes(core.NewPatchAction(servicesResource, c.ns, name, data), &v1.Service{})

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

示例3: Patch

// Patch applies the patch and returns the patched ingress.
func (c *FakeIngresses) Patch(name string, pt api.PatchType, data []byte) (result *extensions.Ingress, err error) {
	obj, err := c.Fake.
		Invokes(core.NewPatchAction(ingressesResource, c.ns, name, data), &extensions.Ingress{})

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

示例4: Patch

// Patch applies the patch and returns the patched job.
func (c *FakeJobs) Patch(name string, pt api.PatchType, data []byte) (result *batch.Job, err error) {
	obj, err := c.Fake.
		Invokes(core.NewPatchAction(jobsResource, c.ns, name, data), &batch.Job{})

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

示例5: Patch

// Patch applies the patch and returns the patched replicaSet.
func (c *FakeReplicaSets) Patch(name string, pt api.PatchType, data []byte) (result *v1beta1.ReplicaSet, err error) {
	obj, err := c.Fake.
		Invokes(core.NewPatchAction(replicasetsResource, c.ns, name, data), &v1beta1.ReplicaSet{})

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

示例6: Patch

// Patch applies the patch and returns the patched horizontalPodAutoscaler.
func (c *FakeHorizontalPodAutoscalers) Patch(name string, pt api.PatchType, data []byte) (result *autoscaling.HorizontalPodAutoscaler, err error) {
	obj, err := c.Fake.
		Invokes(core.NewPatchAction(horizontalpodautoscalersResource, c.ns, name, data), &autoscaling.HorizontalPodAutoscaler{})

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

示例7: Patch

// Patch applies the patch and returns the patched replicationController.
func (c *FakeReplicationControllers) Patch(name string, pt api.PatchType, data []byte) (result *api.ReplicationController, err error) {
	obj, err := c.Fake.
		Invokes(core.NewPatchAction(replicationcontrollersResource, c.ns, name, data), &api.ReplicationController{})

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

示例8: Patch

// Patch applies the patch and returns the patched roleBinding.
func (c *FakeRoleBindings) Patch(name string, pt api.PatchType, data []byte) (result *rbac.RoleBinding, err error) {
	obj, err := c.Fake.
		Invokes(core.NewPatchAction(rolebindingsResource, c.ns, name, data), &rbac.RoleBinding{})

	if obj == nil {
		return nil, err
	}
	return obj.(*rbac.RoleBinding), err
}
開發者ID:cesardraw2,項目名稱:kubernetes,代碼行數:10,代碼來源:fake_rolebinding.go

示例9: Patch

// Patch applies the patch and returns the patched limitRange.
func (c *FakeLimitRanges) Patch(name string, pt api.PatchType, data []byte) (result *api.LimitRange, err error) {
	obj, err := c.Fake.
		Invokes(core.NewPatchAction(limitrangesResource, c.ns, name, data), &api.LimitRange{})

	if obj == nil {
		return nil, err
	}
	return obj.(*api.LimitRange), err
}
開發者ID:cesardraw2,項目名稱:kubernetes,代碼行數:10,代碼來源:fake_limitrange.go

示例10: Patch

// Patch applies the patch and returns the patched deployment.
func (c *FakeDeployments) Patch(name string, pt api.PatchType, data []byte) (result *extensions.Deployment, err error) {
	obj, err := c.Fake.
		Invokes(core.NewPatchAction(deploymentsResource, c.ns, name, data), &extensions.Deployment{})

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

示例11: Patch

// Patch applies the patch and returns the patched endpoints.
func (c *FakeEndpoints) Patch(name string, pt api.PatchType, data []byte) (result *v1.Endpoints, err error) {
	obj, err := c.Fake.
		Invokes(core.NewPatchAction(endpointsResource, c.ns, name, data), &v1.Endpoints{})

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

示例12: Patch

// Patch applies the patch and returns the patched configMap.
func (c *FakeConfigMaps) Patch(name string, pt api.PatchType, data []byte) (result *v1.ConfigMap, err error) {
	obj, err := c.Fake.
		Invokes(core.NewPatchAction(configmapsResource, c.ns, name, data), &v1.ConfigMap{})

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

示例13: Patch

// Patch applies the patch and returns the patched resourceQuota.
func (c *FakeResourceQuotas) Patch(name string, pt api.PatchType, data []byte) (result *v1.ResourceQuota, err error) {
	obj, err := c.Fake.
		Invokes(core.NewPatchAction(resourcequotasResource, c.ns, name, data), &v1.ResourceQuota{})

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

示例14: Patch

// Patch applies the patch and returns the patched testType.
func (c *FakeTestTypes) Patch(name string, pt api.PatchType, data []byte) (result *testgroup_k8s_io.TestType, err error) {
	obj, err := c.Fake.
		Invokes(core.NewPatchAction(testtypesResource, c.ns, name, data), &testgroup_k8s_io.TestType{})

	if obj == nil {
		return nil, err
	}
	return obj.(*testgroup_k8s_io.TestType), err
}
開發者ID:cesardraw2,項目名稱:kubernetes,代碼行數:10,代碼來源:fake_testtype.go

示例15: Patch

// Patch applies the patch and returns the patched persistentVolumeClaim.
func (c *FakePersistentVolumeClaims) Patch(name string, pt api.PatchType, data []byte) (result *api.PersistentVolumeClaim, err error) {
	obj, err := c.Fake.
		Invokes(core.NewPatchAction(persistentvolumeclaimsResource, c.ns, name, data), &api.PersistentVolumeClaim{})

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


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