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


Golang registrytest.NewEtcdStorage函數代碼示例

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


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

示例1: newFailDeleteStorage

func newFailDeleteStorage(t *testing.T, called *bool) (*REST, *etcdtesting.EtcdTestServer) {
	etcdStorage, server := registrytest.NewEtcdStorage(t, "")
	restOptions := generic.RESTOptions{StorageConfig: etcdStorage, Decorator: generic.UndecoratedStorage, DeleteCollectionWorkers: 3}
	storage := NewStorage(restOptions, nil, nil)
	storage.Pod.Store.Storage = FailDeletionStorage{storage.Pod.Store.Storage, called}
	return storage.Pod, server
}
開發者ID:bryk,項目名稱:kubernetes,代碼行數:7,代碼來源:etcd_test.go

示例2: newFailDeleteStorage

func newFailDeleteStorage(t *testing.T, called *bool) (*REST, *etcdtesting.EtcdTestServer) {
	etcdStorage, server := registrytest.NewEtcdStorage(t, "")
	failDeleteStorage := FailDeletionStorage{etcdStorage, called}
	restOptions := generic.RESTOptions{failDeleteStorage, generic.UndecoratedStorage, 3}
	storage := NewStorage(restOptions, nil, nil)
	return storage.Pod, server
}
開發者ID:ysh7,項目名稱:kubernetes,代碼行數:7,代碼來源:etcd_test.go

示例3: newStorage

func newStorage(t *testing.T) (*REST, *StatusREST, *InternalREST, *etcdtesting.EtcdTestServer) {
	etcdStorage, server := registrytest.NewEtcdStorage(t, latest.Version.Group)
	imageStorage, statusStorage, internalStorage, err := NewREST(restoptions.NewSimpleGetter(etcdStorage), noDefaultRegistry, &fakeSubjectAccessReviewRegistry{}, &testutil.FakeImageStreamLimitVerifier{})
	if err != nil {
		t.Fatal(err)
	}
	return imageStorage, statusStorage, internalStorage, server
}
開發者ID:Xmagicer,項目名稱:origin,代碼行數:8,代碼來源:etcd_test.go

示例4: newStorage

func newStorage(t *testing.T) (*REST, *etcdtesting.EtcdTestServer) {
	etcdStorage, server := registrytest.NewEtcdStorage(t, latest.Version.Group)
	storage, err := NewREST(restoptions.NewSimpleGetter(etcdStorage))
	if err != nil {
		t.Fatal(err)
	}
	return storage, server
}
開發者ID:sgallagher,項目名稱:origin,代碼行數:8,代碼來源:etcd_test.go

示例5: newStorage

func newStorage(t *testing.T) (*REST, *etcdtesting.EtcdTestServer) {
	etcdStorage, server := registrytest.NewEtcdStorage(t, "")
	storage, _, _, err := NewREST(restoptions.NewSimpleGetter(etcdStorage), testclient.NewSimpleFake())
	if err != nil {
		t.Fatal(err)
	}
	return storage, server
}
開發者ID:Xmagicer,項目名稱:origin,代碼行數:8,代碼來源:etcd_test.go

示例6: newStorage

func newStorage(t *testing.T, allocator routetypes.RouteAllocator) (*REST, *etcdtesting.EtcdTestServer) {
	etcdStorage, server := registrytest.NewEtcdStorage(t, "")
	storage, _, err := NewREST(restoptions.NewSimpleGetter(etcdStorage), allocator)
	if err != nil {
		t.Fatal(err)
	}
	return storage, server
}
開發者ID:Xmagicer,項目名稱:origin,代碼行數:8,代碼來源:etcd_test.go

示例7: newStorage

func newStorage(t *testing.T) (*REST, *etcdtesting.EtcdTestServer) {
	etcdStorage, server := registrytest.NewEtcdStorage(t, federation.GroupName)
	restOptions := generic.RESTOptions{
		Storage:                 etcdStorage,
		Decorator:               generic.UndecoratedStorage,
		DeleteCollectionWorkers: 1}
	storage, _ := NewREST(restOptions)
	return storage, server
}
開發者ID:CodeJuan,項目名稱:kubernetes,代碼行數:9,代碼來源:etcd_test.go

示例8: newStorage

func newStorage(t *testing.T) (*REST, *etcdtesting.EtcdTestServer) {
	etcdStorage, server := registrytest.NewEtcdStorage(t, "")
	restOptions := generic.RESTOptions{StorageConfig: etcdStorage, Decorator: generic.UndecoratedStorage, DeleteCollectionWorkers: 1}
	storage, err := NewStorage(restOptions, kubeletclient.KubeletClientConfig{}, nil)
	if err != nil {
		t.Fatal(err)
	}
	return storage.Node, server
}
開發者ID:eljefedelrodeodeljefe,項目名稱:kubernetes,代碼行數:9,代碼來源:etcd_test.go

示例9: newStorage

func newStorage(t *testing.T) (*REST, *etcdtesting.EtcdTestServer) {
	etcdStorage, server := registrytest.NewEtcdStorage(t, "")
	restOptions := generic.RESTOptions{
		StorageConfig:           etcdStorage,
		Decorator:               generic.UndecoratedStorage,
		DeleteCollectionWorkers: 1,
		ResourcePrefix:          "endpoints",
	}
	return NewREST(restOptions), server
}
開發者ID:kubernetes,項目名稱:kubernetes,代碼行數:10,代碼來源:storage_test.go

示例10: newStorage

func newStorage(t *testing.T) (*ScaleREST, *etcdtesting.EtcdTestServer, storage.Interface, factory.DestroyFunc) {
	etcdStorage, server := registrytest.NewEtcdStorage(t, "")
	restOptions := generic.RESTOptions{StorageConfig: etcdStorage, Decorator: generic.UndecoratedStorage, DeleteCollectionWorkers: 1, ResourcePrefix: "controllers"}
	s, d := generic.NewRawStorage(etcdStorage)
	destroyFunc := func() {
		d()
		server.Terminate(t)
	}
	return NewStorage(restOptions).Scale, server, s, destroyFunc
}
開發者ID:alex-mohr,項目名稱:kubernetes,代碼行數:10,代碼來源:etcd_test.go

示例11: newStorage

func newStorage(t *testing.T) (*REST, *etcdtesting.EtcdTestServer) {
	etcdStorage, server := registrytest.NewEtcdStorage(t, extensions.GroupName)
	restOptions := generic.RESTOptions{
		StorageConfig:           etcdStorage,
		Decorator:               generic.UndecoratedStorage,
		DeleteCollectionWorkers: 1,
		ResourcePrefix:          "thirdpartyresources",
	}
	return NewREST(restOptions), server
}
開發者ID:kubernetes,項目名稱:kubernetes,代碼行數:10,代碼來源:storage_test.go

示例12: newStorage

func newStorage(t *testing.T) (*REST, *StatusREST, *etcdtesting.EtcdTestServer) {
	etcdStorage, server := registrytest.NewEtcdStorage(t, autoscaling.GroupName)
	restOptions := generic.RESTOptions{
		StorageConfig:           etcdStorage,
		Decorator:               generic.UndecoratedStorage,
		DeleteCollectionWorkers: 1,
		ResourcePrefix:          "horizontalpodautoscalers",
	}
	horizontalPodAutoscalerStorage, statusStorage := NewREST(restOptions)
	return horizontalPodAutoscalerStorage, statusStorage, server
}
開發者ID:alex-mohr,項目名稱:kubernetes,代碼行數:11,代碼來源:etcd_test.go

示例13: newStorage

func newStorage(t *testing.T) (*REST, *BindingREST, *StatusREST, *etcdtesting.EtcdTestServer) {
	etcdStorage, server := registrytest.NewEtcdStorage(t, "")
	restOptions := generic.RESTOptions{
		StorageConfig:           etcdStorage,
		Decorator:               generic.UndecoratedStorage,
		DeleteCollectionWorkers: 3,
		ResourcePrefix:          "pods",
	}
	storage := NewStorage(restOptions, nil, nil, nil)
	return storage.Pod, storage.Binding, storage.Status, server
}
開發者ID:kubernetes,項目名稱:kubernetes,代碼行數:11,代碼來源:storage_test.go

示例14: newStorage

func newStorage(t *testing.T) (*JobStorage, *etcdtesting.EtcdTestServer) {
	etcdStorage, server := registrytest.NewEtcdStorage(t, batch.GroupName)
	restOptions := generic.RESTOptions{
		StorageConfig:           etcdStorage,
		Decorator:               generic.UndecoratedStorage,
		DeleteCollectionWorkers: 1,
		ResourcePrefix:          "jobs",
	}
	jobStorage := NewStorage(restOptions)
	return &jobStorage, server
}
開發者ID:jonboulle,項目名稱:kubernetes,代碼行數:11,代碼來源:etcd_test.go

示例15: newStorage

func newStorage(t *testing.T) (*REST, *StatusREST, *etcdtesting.EtcdTestServer) {
	etcdStorage, server := registrytest.NewEtcdStorage(t, extensions.GroupName)
	restOptions := generic.RESTOptions{
		StorageConfig:           etcdStorage,
		Decorator:               generic.UndecoratedStorage,
		DeleteCollectionWorkers: 1,
		ResourcePrefix:          "daemonsets",
	}
	daemonSetStorage, statusStorage := NewREST(restOptions)
	return daemonSetStorage, statusStorage, server
}
開發者ID:alex-mohr,項目名稱:kubernetes,代碼行數:11,代碼來源:etcd_test.go


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