当前位置: 首页>>代码示例>>Golang>>正文


Golang testing.NewUpdateAction函数代码示例

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


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

示例1: Update

func (c *FakeHorizontalPodAutoscalers) Update(horizontalPodAutoscaler *v1.HorizontalPodAutoscaler) (result *v1.HorizontalPodAutoscaler, err error) {
	obj, err := c.Fake.
		Invokes(testing.NewUpdateAction(horizontalpodautoscalersResource, c.ns, horizontalPodAutoscaler), &v1.HorizontalPodAutoscaler{})

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

示例2: Update

func (c *FakePodDisruptionBudgets) Update(podDisruptionBudget *v1beta1.PodDisruptionBudget) (result *v1beta1.PodDisruptionBudget, err error) {
	obj, err := c.Fake.
		Invokes(testing.NewUpdateAction(poddisruptionbudgetsResource, c.ns, podDisruptionBudget), &v1beta1.PodDisruptionBudget{})

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

示例3: Update

func (c *FakeEvents) Update(event *v1.Event) (result *v1.Event, err error) {
	obj, err := c.Fake.
		Invokes(testing.NewUpdateAction(eventsResource, c.ns, event), &v1.Event{})

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

示例4: Update

func (c *FakeSecrets) Update(secret *v1.Secret) (result *v1.Secret, err error) {
	obj, err := c.Fake.
		Invokes(testing.NewUpdateAction(secretsResource, c.ns, secret), &v1.Secret{})

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

示例5: Update

func (c *FakeReplicaSets) Update(replicaSet *v1beta1.ReplicaSet) (result *v1beta1.ReplicaSet, err error) {
	obj, err := c.Fake.
		Invokes(testing.NewUpdateAction(replicasetsResource, c.ns, replicaSet), &v1beta1.ReplicaSet{})

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

示例6: Update

func (c *FakeDeployments) Update(deployment *v1beta1.Deployment) (result *v1beta1.Deployment, err error) {
	obj, err := c.Fake.
		Invokes(testing.NewUpdateAction(deploymentsResource, c.ns, deployment), &v1beta1.Deployment{})

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

示例7: Update

func (c *FakePodTemplates) Update(podTemplate *v1.PodTemplate) (result *v1.PodTemplate, err error) {
	obj, err := c.Fake.
		Invokes(testing.NewUpdateAction(podtemplatesResource, c.ns, podTemplate), &v1.PodTemplate{})

	if obj == nil {
		return nil, err
	}
	return obj.(*v1.PodTemplate), err
}
开发者ID:Q-Lee,项目名称:kubernetes,代码行数:9,代码来源:fake_podtemplate.go

示例8: Update

func (c *FakeReplicationControllers) Update(replicationController *v1.ReplicationController) (result *v1.ReplicationController, err error) {
	obj, err := c.Fake.
		Invokes(testing.NewUpdateAction(replicationcontrollersResource, c.ns, replicationController), &v1.ReplicationController{})

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

示例9: Update

func (c *FakePersistentVolumeClaims) Update(persistentVolumeClaim *v1.PersistentVolumeClaim) (result *v1.PersistentVolumeClaim, err error) {
	obj, err := c.Fake.
		Invokes(testing.NewUpdateAction(persistentvolumeclaimsResource, c.ns, persistentVolumeClaim), &v1.PersistentVolumeClaim{})

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

示例10: Update

func (c *FakeJobs) Update(job *v2alpha1.Job) (result *v2alpha1.Job, err error) {
	obj, err := c.Fake.
		Invokes(testing.NewUpdateAction(jobsResource, c.ns, job), &v2alpha1.Job{})

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

示例11: Update

func (c *FakeIngresses) Update(ingress *v1beta1.Ingress) (result *v1beta1.Ingress, err error) {
	obj, err := c.Fake.
		Invokes(testing.NewUpdateAction(ingressesResource, c.ns, ingress), &v1beta1.Ingress{})

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

示例12: Update

func (c *FakeConfigMaps) Update(configMap *v1.ConfigMap) (result *v1.ConfigMap, err error) {
	obj, err := c.Fake.
		Invokes(testing.NewUpdateAction(configmapsResource, c.ns, configMap), &v1.ConfigMap{})

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

示例13: Update

func (c *FakeLimitRanges) Update(limitRange *v1.LimitRange) (result *v1.LimitRange, err error) {
	obj, err := c.Fake.
		Invokes(testing.NewUpdateAction(limitrangesResource, c.ns, limitRange), &v1.LimitRange{})

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

示例14: Update

func (c *FakeRoleBindings) Update(roleBinding *v1beta1.RoleBinding) (result *v1beta1.RoleBinding, err error) {
	obj, err := c.Fake.
		Invokes(testing.NewUpdateAction(rolebindingsResource, c.ns, roleBinding), &v1beta1.RoleBinding{})

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

示例15: Update

func (c *FakeResourceQuotas) Update(resourceQuota *v1.ResourceQuota) (result *v1.ResourceQuota, err error) {
	obj, err := c.Fake.
		Invokes(testing.NewUpdateAction(resourcequotasResource, c.ns, resourceQuota), &v1.ResourceQuota{})

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


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