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


Golang testing.NewRootUpdateAction函数代码示例

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


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

示例1: Update

func (c *FakeCertificateSigningRequests) Update(certificateSigningRequest *v1alpha1.CertificateSigningRequest) (result *v1alpha1.CertificateSigningRequest, err error) {
	obj, err := c.Fake.
		Invokes(testing.NewRootUpdateAction(certificatesigningrequestsResource, certificateSigningRequest), &v1alpha1.CertificateSigningRequest{})
	if obj == nil {
		return nil, err
	}
	return obj.(*v1alpha1.CertificateSigningRequest), err
}
开发者ID:alex-mohr,项目名称:kubernetes,代码行数:8,代码来源:fake_certificatesigningrequest.go

示例2: Update

func (c *FakeNamespaces) Update(namespace *v1.Namespace) (result *v1.Namespace, err error) {
	obj, err := c.Fake.
		Invokes(testing.NewRootUpdateAction(namespacesResource, namespace), &v1.Namespace{})
	if obj == nil {
		return nil, err
	}
	return obj.(*v1.Namespace), err
}
开发者ID:alex-mohr,项目名称:kubernetes,代码行数:8,代码来源:fake_namespace.go

示例3: Update

func (c *FakePodSecurityPolicies) Update(podSecurityPolicy *v1beta1.PodSecurityPolicy) (result *v1beta1.PodSecurityPolicy, err error) {
	obj, err := c.Fake.
		Invokes(testing.NewRootUpdateAction(podsecuritypoliciesResource, podSecurityPolicy), &v1beta1.PodSecurityPolicy{})
	if obj == nil {
		return nil, err
	}
	return obj.(*v1beta1.PodSecurityPolicy), err
}
开发者ID:alex-mohr,项目名称:kubernetes,代码行数:8,代码来源:fake_podsecuritypolicy.go

示例4: Update

func (c *FakeClusterRoleBindings) Update(clusterRoleBinding *v1alpha1.ClusterRoleBinding) (result *v1alpha1.ClusterRoleBinding, err error) {
	obj, err := c.Fake.
		Invokes(testing.NewRootUpdateAction(clusterrolebindingsResource, clusterRoleBinding), &v1alpha1.ClusterRoleBinding{})
	if obj == nil {
		return nil, err
	}
	return obj.(*v1alpha1.ClusterRoleBinding), err
}
开发者ID:maisem,项目名称:kubernetes,代码行数:8,代码来源:fake_clusterrolebinding.go

示例5: Update

func (c *FakePersistentVolumes) Update(persistentVolume *v1.PersistentVolume) (result *v1.PersistentVolume, err error) {
	obj, err := c.Fake.
		Invokes(testing.NewRootUpdateAction(persistentvolumesResource, persistentVolume), &v1.PersistentVolume{})
	if obj == nil {
		return nil, err
	}
	return obj.(*v1.PersistentVolume), err
}
开发者ID:maisem,项目名称:kubernetes,代码行数:8,代码来源:fake_persistentvolume.go

示例6: Update

func (c *FakeStorageClasses) Update(storageClass *v1beta1.StorageClass) (result *v1beta1.StorageClass, err error) {
	obj, err := c.Fake.
		Invokes(testing.NewRootUpdateAction(storageclassesResource, storageClass), &v1beta1.StorageClass{})
	if obj == nil {
		return nil, err
	}
	return obj.(*v1beta1.StorageClass), err
}
开发者ID:maisem,项目名称:kubernetes,代码行数:8,代码来源:fake_storageclass.go

示例7: Update

func (c *FakeComponentStatuses) Update(componentStatus *v1.ComponentStatus) (result *v1.ComponentStatus, err error) {
	obj, err := c.Fake.
		Invokes(testing.NewRootUpdateAction(componentstatusesResource, componentStatus), &v1.ComponentStatus{})
	if obj == nil {
		return nil, err
	}
	return obj.(*v1.ComponentStatus), err
}
开发者ID:kubernetes,项目名称:kubernetes,代码行数:8,代码来源:fake_componentstatus.go

示例8: Update

func (c *FakeClusterRoles) Update(clusterRole *v1beta1.ClusterRole) (result *v1beta1.ClusterRole, err error) {
	obj, err := c.Fake.
		Invokes(testing.NewRootUpdateAction(clusterrolesResource, clusterRole), &v1beta1.ClusterRole{})
	if obj == nil {
		return nil, err
	}
	return obj.(*v1beta1.ClusterRole), err
}
开发者ID:kubernetes,项目名称:kubernetes,代码行数:8,代码来源:fake_clusterrole.go

示例9: Update

func (c *FakeThirdPartyResources) Update(thirdPartyResource *v1beta1.ThirdPartyResource) (result *v1beta1.ThirdPartyResource, err error) {
	obj, err := c.Fake.
		Invokes(testing.NewRootUpdateAction(thirdpartyresourcesResource, thirdPartyResource), &v1beta1.ThirdPartyResource{})
	if obj == nil {
		return nil, err
	}
	return obj.(*v1beta1.ThirdPartyResource), err
}
开发者ID:maisem,项目名称:kubernetes,代码行数:8,代码来源:fake_thirdpartyresource.go

示例10: UpdateWithEventNamespace

// Update replaces an existing event. Returns the copy of the event the server returns, or an error.
func (c *FakeEvents) UpdateWithEventNamespace(event *v1.Event) (*v1.Event, error) {
	action := testing.NewRootUpdateAction(eventsResource, event)
	if c.ns != "" {
		action = testing.NewUpdateAction(eventsResource, c.ns, event)
	}
	obj, err := c.Fake.Invokes(action, event)
	if obj == nil {
		return nil, err
	}

	return obj.(*v1.Event), err
}
开发者ID:eljefedelrodeodeljefe,项目名称:kubernetes,代码行数:13,代码来源:fake_event_expansion.go


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