Remove older names

This commit is contained in:
Clayton Coleman 2015-03-21 12:30:22 -04:00
parent d46087db50
commit 5a3f0adbcc
3 changed files with 6 additions and 45 deletions

View File

@ -21,7 +21,6 @@ import (
"github.com/GoogleCloudPlatform/kubernetes/pkg/api/rest"
"github.com/GoogleCloudPlatform/kubernetes/pkg/fields"
"github.com/GoogleCloudPlatform/kubernetes/pkg/labels"
"github.com/GoogleCloudPlatform/kubernetes/pkg/runtime"
"github.com/GoogleCloudPlatform/kubernetes/pkg/watch"
)
@ -41,26 +40,14 @@ type Registry interface {
DeleteNamespace(ctx api.Context, namespaceID string) error
}
// Storage is an interface for a standard REST Storage backend
// TODO: move me somewhere common
type Storage interface {
rest.GracefulDeleter
rest.Lister
rest.Getter
rest.Watcher
Create(ctx api.Context, obj runtime.Object) (runtime.Object, error)
Update(ctx api.Context, obj runtime.Object) (runtime.Object, bool, error)
}
// storage puts strong typing around storage calls
type storage struct {
Storage
rest.StandardStorage
}
// NewRegistry returns a new Registry interface for the given Storage. Any mismatched
// types will panic.
func NewRegistry(s Storage) Registry {
func NewRegistry(s rest.StandardStorage) Registry {
return &storage{s}
}

View File

@ -21,7 +21,6 @@ import (
"github.com/GoogleCloudPlatform/kubernetes/pkg/api/rest"
"github.com/GoogleCloudPlatform/kubernetes/pkg/fields"
"github.com/GoogleCloudPlatform/kubernetes/pkg/labels"
"github.com/GoogleCloudPlatform/kubernetes/pkg/runtime"
"github.com/GoogleCloudPlatform/kubernetes/pkg/watch"
)
@ -41,26 +40,14 @@ type Registry interface {
DeletePod(ctx api.Context, podID string) error
}
// Storage is an interface for a standard REST Storage backend
// TODO: move me somewhere common
type Storage interface {
rest.GracefulDeleter
rest.Lister
rest.Getter
rest.Watcher
Create(ctx api.Context, obj runtime.Object) (runtime.Object, error)
Update(ctx api.Context, obj runtime.Object) (runtime.Object, bool, error)
}
// storage puts strong typing around storage calls
type storage struct {
Storage
rest.StandardStorage
}
// NewRegistry returns a new Registry interface for the given Storage. Any mismatched
// types will panic.
func NewRegistry(s Storage) Registry {
func NewRegistry(s rest.StandardStorage) Registry {
return &storage{s}
}

View File

@ -21,7 +21,6 @@ import (
"github.com/GoogleCloudPlatform/kubernetes/pkg/api/rest"
"github.com/GoogleCloudPlatform/kubernetes/pkg/fields"
"github.com/GoogleCloudPlatform/kubernetes/pkg/labels"
"github.com/GoogleCloudPlatform/kubernetes/pkg/runtime"
"github.com/GoogleCloudPlatform/kubernetes/pkg/watch"
)
@ -41,26 +40,14 @@ type Registry interface {
DeleteResourceQuota(ctx api.Context, podID string) error
}
// Storage is an interface for a standard REST Storage backend
// TODO: move me somewhere common
type Storage interface {
rest.GracefulDeleter
rest.Lister
rest.Getter
rest.Watcher
Create(ctx api.Context, obj runtime.Object) (runtime.Object, error)
Update(ctx api.Context, obj runtime.Object) (runtime.Object, bool, error)
}
// storage puts strong typing around storage calls
type storage struct {
Storage
rest.StandardStorage
}
// NewRegistry returns a new Registry interface for the given Storage. Any mismatched
// types will panic.
func NewRegistry(s Storage) Registry {
func NewRegistry(s rest.StandardStorage) Registry {
return &storage{s}
}