mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-14 14:23:37 +00:00
amend the comment
This commit is contained in:
parent
5ca03d674e
commit
fe13072443
@ -285,7 +285,7 @@ func ListResource(r rest.Lister, rw rest.Watcher, scope RequestScope, forceWatch
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Watches for single objects are routed to this function.
|
// Watches for single objects are routed to this function.
|
||||||
// Treat a /name parameter the same as a field selector entry.
|
// Treat a name parameter the same as a field selector entry.
|
||||||
hasName := true
|
hasName := true
|
||||||
_, name, err := scope.Namer.Name(req)
|
_, name, err := scope.Namer.Name(req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -1150,7 +1150,7 @@ func (e *Store) Watch(ctx genericapirequest.Context, options *metainternalversio
|
|||||||
return e.WatchPredicate(ctx, predicate, resourceVersion)
|
return e.WatchPredicate(ctx, predicate, resourceVersion)
|
||||||
}
|
}
|
||||||
|
|
||||||
// WatchPredicate starts a watch for the items that m matches.
|
// WatchPredicate starts a watch for the items that matches.
|
||||||
func (e *Store) WatchPredicate(ctx genericapirequest.Context, p storage.SelectionPredicate, resourceVersion string) (watch.Interface, error) {
|
func (e *Store) WatchPredicate(ctx genericapirequest.Context, p storage.SelectionPredicate, resourceVersion string) (watch.Interface, error) {
|
||||||
if name, ok := p.MatchesSingle(); ok {
|
if name, ok := p.MatchesSingle(); ok {
|
||||||
if key, err := e.KeyFunc(ctx, name); err == nil {
|
if key, err := e.KeyFunc(ctx, name); err == nil {
|
||||||
@ -1276,7 +1276,7 @@ func (e *Store) CompleteWithOptions(options *generic.StoreOptions) error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
// Resource prefix must come from the underlying factory
|
// ResourcePrefix must come from the underlying factory
|
||||||
prefix := opts.ResourcePrefix
|
prefix := opts.ResourcePrefix
|
||||||
if !strings.HasPrefix(prefix, "/") {
|
if !strings.HasPrefix(prefix, "/") {
|
||||||
prefix = "/" + prefix
|
prefix = "/" + prefix
|
||||||
|
Loading…
Reference in New Issue
Block a user