Move REST* interfaces into pkg/api/rest

Dependency chain is now api -> api/rest -> apiserver.  Makes the
interfaces much cleaner to read, and cleans up some inconsistenties
that crept in along the way.
This commit is contained in:
Clayton Coleman
2015-03-21 12:24:16 -04:00
parent df672504c2
commit d46087db50
30 changed files with 216 additions and 187 deletions

View File

@@ -32,7 +32,7 @@ type REST struct {
registry Registry
}
// NewREST returns a new apiserver.RESTStorage implementation for endpoints
// NewREST returns a new rest.Storage implementation for endpoints
func NewREST(registry Registry) *REST {
return &REST{
registry: registry,
@@ -53,7 +53,7 @@ func (rs *REST) List(ctx api.Context, label labels.Selector, field fields.Select
}
// Watch returns Endpoint events via a watch.Interface.
// It implements apiserver.ResourceWatcher.
// It implements rest.Watcher.
func (rs *REST) Watch(ctx api.Context, label labels.Selector, field fields.Selector, resourceVersion string) (watch.Interface, error) {
return rs.registry.WatchEndpoints(ctx, label, field, resourceVersion)
}