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


Golang testing.NewGetAction函數代碼示例

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


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

示例1: Get

func (c *FakeReplicationControllers) Get(name string, options meta_v1.GetOptions) (result *v1.ReplicationController, err error) {
	obj, err := c.Fake.
		Invokes(testing.NewGetAction(replicationcontrollersResource, c.ns, name), &v1.ReplicationController{})

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

示例2: Get

func (c *FakePodTemplates) Get(name string) (result *v1.PodTemplate, err error) {
	obj, err := c.Fake.
		Invokes(testing.NewGetAction(podtemplatesResource, c.ns, name), &v1.PodTemplate{})

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

示例3: Get

func (c *FakeReplicaSets) Get(name string) (result *v1beta1.ReplicaSet, err error) {
	obj, err := c.Fake.
		Invokes(testing.NewGetAction(replicasetsResource, c.ns, name), &v1beta1.ReplicaSet{})

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

示例4: Get

func (c *FakePersistentVolumeClaims) Get(name string) (result *v1.PersistentVolumeClaim, err error) {
	obj, err := c.Fake.
		Invokes(testing.NewGetAction(persistentvolumeclaimsResource, c.ns, name), &v1.PersistentVolumeClaim{})

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

示例5: Get

func (c *FakeJobs) Get(name string) (result *v2alpha1.Job, err error) {
	obj, err := c.Fake.
		Invokes(testing.NewGetAction(jobsResource, c.ns, name), &v2alpha1.Job{})

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

示例6: Get

func (c *FakeCronJobs) Get(name string, options meta_v1.GetOptions) (result *v2alpha1.CronJob, err error) {
	obj, err := c.Fake.
		Invokes(testing.NewGetAction(cronjobsResource, c.ns, name), &v2alpha1.CronJob{})

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

示例7: Get

func (c *FakeConfigMaps) Get(name string, options meta_v1.GetOptions) (result *v1.ConfigMap, err error) {
	obj, err := c.Fake.
		Invokes(testing.NewGetAction(configmapsResource, c.ns, name), &v1.ConfigMap{})

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

示例8: Get

func (c *FakeLimitRanges) Get(name string) (result *v1.LimitRange, err error) {
	obj, err := c.Fake.
		Invokes(testing.NewGetAction(limitrangesResource, c.ns, name), &v1.LimitRange{})

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

示例9: Get

func (c *FakeEvents) Get(name string) (result *v1.Event, err error) {
	obj, err := c.Fake.
		Invokes(testing.NewGetAction(eventsResource, c.ns, name), &v1.Event{})

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

示例10: Get

func (c *FakeRoles) Get(name string) (result *v1alpha1.Role, err error) {
	obj, err := c.Fake.
		Invokes(testing.NewGetAction(rolesResource, c.ns, name), &v1alpha1.Role{})

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

示例11: Get

func (c *FakeResourceQuotas) Get(name string, options meta_v1.GetOptions) (result *v1.ResourceQuota, err error) {
	obj, err := c.Fake.
		Invokes(testing.NewGetAction(resourcequotasResource, c.ns, name), &v1.ResourceQuota{})

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

示例12: Get

func (c *FakeRoleBindings) Get(name string, options meta_v1.GetOptions) (result *v1alpha1.RoleBinding, err error) {
	obj, err := c.Fake.
		Invokes(testing.NewGetAction(rolebindingsResource, c.ns, name), &v1alpha1.RoleBinding{})

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

示例13: Get

func (c *FakeHorizontalPodAutoscalers) Get(name string) (result *v1.HorizontalPodAutoscaler, err error) {
	obj, err := c.Fake.
		Invokes(testing.NewGetAction(horizontalpodautoscalersResource, c.ns, name), &v1.HorizontalPodAutoscaler{})

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

示例14: Get

func (c *FakePodDisruptionBudgets) Get(name string) (result *v1beta1.PodDisruptionBudget, err error) {
	obj, err := c.Fake.
		Invokes(testing.NewGetAction(poddisruptionbudgetsResource, c.ns, name), &v1beta1.PodDisruptionBudget{})

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

示例15: Get

func (c *FakeServices) Get(name string) (result *v1.Service, err error) {
	obj, err := c.Fake.
		Invokes(testing.NewGetAction(servicesResource, c.ns, name), &v1.Service{})

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


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