mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-09 21:21:14 +00:00
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:
@@ -71,14 +71,14 @@ type PodLister interface {
|
||||
ListPods(ctx api.Context, labels labels.Selector) (*api.PodList, error)
|
||||
}
|
||||
|
||||
// REST implements apiserver.RESTStorage for the replication controller service.
|
||||
// REST implements rest.Storage for the replication controller service.
|
||||
type REST struct {
|
||||
registry Registry
|
||||
podLister PodLister
|
||||
strategy rcStrategy
|
||||
}
|
||||
|
||||
// NewREST returns a new apiserver.RESTStorage for the given registry and PodLister.
|
||||
// NewREST returns a new rest.Storage for the given registry and PodLister.
|
||||
func NewREST(registry Registry, podLister PodLister) *REST {
|
||||
return &REST{
|
||||
registry: registry,
|
||||
@@ -167,7 +167,7 @@ func (rs *REST) Update(ctx api.Context, obj runtime.Object) (runtime.Object, boo
|
||||
}
|
||||
|
||||
// Watch returns ReplicationController 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.WatchControllers(ctx, label, field, resourceVersion)
|
||||
}
|
||||
|
Reference in New Issue
Block a user