• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Golang core.NewPatchSubresourceAction函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Golang中k8s/io/kubernetes/pkg/client/testing/core.NewPatchSubresourceAction函数的典型用法代码示例。如果您正苦于以下问题:Golang NewPatchSubresourceAction函数的具体用法?Golang NewPatchSubresourceAction怎么用?Golang NewPatchSubresourceAction使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了NewPatchSubresourceAction函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Golang代码示例。

示例1: Patch

// Patch applies the patch and returns the patched cronJob.
func (c *FakeCronJobs) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *batch.CronJob, err error) {
	obj, err := c.Fake.
		Invokes(core.NewPatchSubresourceAction(cronjobsResource, c.ns, name, data, subresources...), &batch.CronJob{})

	if obj == nil {
		return nil, err
	}
	return obj.(*batch.CronJob), err
}
开发者ID:kubernetes,项目名称:kubernetes,代码行数:10,代码来源:fake_cronjob.go


示例2: Patch

// Patch applies the patch and returns the patched serviceAccount.
func (c *FakeServiceAccounts) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *api.ServiceAccount, err error) {
	obj, err := c.Fake.
		Invokes(core.NewPatchSubresourceAction(serviceaccountsResource, c.ns, name, data, subresources...), &api.ServiceAccount{})

	if obj == nil {
		return nil, err
	}
	return obj.(*api.ServiceAccount), err
}
开发者ID:humblec,项目名称:kubernetes,代码行数:10,代码来源:fake_serviceaccount.go


示例3: Patch

// Patch applies the patch and returns the patched podDisruptionBudget.
func (c *FakePodDisruptionBudgets) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1alpha1.PodDisruptionBudget, err error) {
	obj, err := c.Fake.
		Invokes(core.NewPatchSubresourceAction(poddisruptionbudgetsResource, c.ns, name, data, subresources...), &v1alpha1.PodDisruptionBudget{})

	if obj == nil {
		return nil, err
	}
	return obj.(*v1alpha1.PodDisruptionBudget), err
}
开发者ID:alex-mohr,项目名称:kubernetes,代码行数:10,代码来源:fake_poddisruptionbudget.go


示例4: Patch

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

	if obj == nil {
		return nil, err
	}
	return obj.(*v1beta1.Job), err
}
开发者ID:nak3,项目名称:kubernetes,代码行数:10,代码来源:fake_job.go


示例5: Patch

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

	if obj == nil {
		return nil, err
	}
	return obj.(*extensions.Ingress), err
}
开发者ID:nak3,项目名称:kubernetes,代码行数:10,代码来源:fake_ingress.go


示例6: Patch

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

	if obj == nil {
		return nil, err
	}
	return obj.(*api.ResourceQuota), err
}
开发者ID:alex-mohr,项目名称:kubernetes,代码行数:10,代码来源:fake_resourcequota.go


示例7: Patch

// Patch applies the patch and returns the patched clusterNetwork.
func (c *FakeClusterNetworks) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.ClusterNetwork, err error) {
	obj, err := c.Fake.
		Invokes(core.NewPatchSubresourceAction(clusternetworksResource, c.ns, name, data, subresources...), &v1.ClusterNetwork{})

	if obj == nil {
		return nil, err
	}
	return obj.(*v1.ClusterNetwork), err
}
开发者ID:juanluisvaladas,项目名称:origin,代码行数:10,代码来源:fake_clusternetwork.go


示例8: PatchStatus

func (c *FakeNodes) PatchStatus(nodeName string, data []byte) (*api.Node, error) {
	obj, err := c.Fake.Invokes(
		core.NewPatchSubresourceAction(nodesResource, "status"), &api.Node{})
	if obj == nil {
		return nil, err
	}

	return obj.(*api.Node), err
}
开发者ID:Cloven,项目名称:minikube,代码行数:9,代码来源:fake_node_expansion.go


示例9: Patch

// Patch applies the patch and returns the patched statefulSet.
func (c *FakeStatefulSets) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *apps.StatefulSet, err error) {
	obj, err := c.Fake.
		Invokes(core.NewPatchSubresourceAction(statefulsetsResource, c.ns, name, data, subresources...), &apps.StatefulSet{})

	if obj == nil {
		return nil, err
	}
	return obj.(*apps.StatefulSet), err
}
开发者ID:nak3,项目名称:kubernetes,代码行数:10,代码来源:fake_statefulset.go


示例10: Patch

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

	if obj == nil {
		return nil, err
	}
	return obj.(*testgroup_k8s_io.TestType), err
}
开发者ID:ncdc,项目名称:kubernetes,代码行数:10,代码来源:fake_testtype.go


示例11: Patch

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

	if obj == nil {
		return nil, err
	}
	return obj.(*v1.Service), err
}
开发者ID:kubernetes,项目名称:kubernetes,代码行数:10,代码来源:fake_service.go


示例12: Patch

// Patch applies the patch and returns the patched deploymentConfig.
func (c *FakeDeploymentConfigs) Patch(name string, pt pkg_api.PatchType, data []byte, subresources ...string) (result *api.DeploymentConfig, err error) {
	obj, err := c.Fake.
		Invokes(core.NewPatchSubresourceAction(deploymentconfigsResource, c.ns, name, data, subresources...), &api.DeploymentConfig{})

	if obj == nil {
		return nil, err
	}
	return obj.(*api.DeploymentConfig), err
}
开发者ID:juanluisvaladas,项目名称:origin,代码行数:10,代码来源:fake_deploymentconfig.go


示例13: PatchStatus

func (c *FakeSecurityContextConstraints) PatchStatus(name string, data []byte) (*api.SecurityContextConstraints, error) {
	obj, err := c.Fake.Invokes(
		core.NewPatchSubresourceAction(securitycontextconstraintsResource, "status"), &api.SecurityContextConstraints{})
	if obj == nil {
		return nil, err
	}

	return obj.(*api.SecurityContextConstraints), err
}
开发者ID:Xmagicer,项目名称:origin,代码行数:9,代码来源:fake_securitycontextconstraints_expansion.go


示例14: Patch

// Patch applies the patch and returns the patched role.
func (c *FakeRoles) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *rbac.Role, err error) {
	obj, err := c.Fake.
		Invokes(core.NewPatchSubresourceAction(rolesResource, c.ns, name, data, subresources...), &rbac.Role{})

	if obj == nil {
		return nil, err
	}
	return obj.(*rbac.Role), err
}
开发者ID:humblec,项目名称:kubernetes,代码行数:10,代码来源:fake_role.go


示例15: Patch

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

	if obj == nil {
		return nil, err
	}
	return obj.(*v1alpha1.RoleBinding), err
}
开发者ID:ncdc,项目名称:kubernetes,代码行数:10,代码来源:fake_rolebinding.go


示例16: Patch

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

	if obj == nil {
		return nil, err
	}
	return obj.(*api.PersistentVolumeClaim), err
}
开发者ID:nak3,项目名称:kubernetes,代码行数:10,代码来源:fake_persistentvolumeclaim.go


示例17: Patch

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

	if obj == nil {
		return nil, err
	}
	return obj.(*api.Pod), err
}
开发者ID:kubernetes,项目名称:kubernetes,代码行数:10,代码来源:fake_pod.go


示例18: Patch

// Patch applies the patch and returns the patched user.
func (c *FakeUsers) Patch(name string, pt pkg_api.PatchType, data []byte, subresources ...string) (result *api.User, err error) {
	obj, err := c.Fake.
		Invokes(core.NewPatchSubresourceAction(usersResource, c.ns, name, data, subresources...), &api.User{})

	if obj == nil {
		return nil, err
	}
	return obj.(*api.User), err
}
开发者ID:juanluisvaladas,项目名称:origin,代码行数:10,代码来源:fake_user.go


示例19: Patch

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

	if obj == nil {
		return nil, err
	}
	return obj.(*v1beta1.ReplicaSet), err
}
开发者ID:kubernetes,项目名称:kubernetes,代码行数:10,代码来源:fake_replicaset.go


示例20: Patch

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

	if obj == nil {
		return nil, err
	}
	return obj.(*autoscaling.HorizontalPodAutoscaler), err
}
开发者ID:ncdc,项目名称:kubernetes,代码行数:10,代码来源:fake_horizontalpodautoscaler.go



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Golang core.NewRootCreateAction函数代码示例发布时间:2022-05-28
下一篇:
Golang core.NewPatchAction函数代码示例发布时间:2022-05-28
热门推荐
热门话题
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap