Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
fe130724
Commit
fe130724
authored
Jul 10, 2017
by
jianglingxia
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
amend the comment
parent
5ca03d67
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
rest.go
staging/src/k8s.io/apiserver/pkg/endpoints/handlers/rest.go
+1
-1
store.go
...c/k8s.io/apiserver/pkg/registry/generic/registry/store.go
+2
-2
No files found.
staging/src/k8s.io/apiserver/pkg/endpoints/handlers/rest.go
View file @
fe130724
...
@@ -285,7 +285,7 @@ func ListResource(r rest.Lister, rw rest.Watcher, scope RequestScope, forceWatch
...
@@ -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
{
...
...
staging/src/k8s.io/apiserver/pkg/registry/generic/registry/store.go
View file @
fe130724
...
@@ -1150,7 +1150,7 @@ func (e *Store) Watch(ctx genericapirequest.Context, options *metainternalversio
...
@@ -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
m
atches.
// 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 {
...
@@ -1276,7 +1276,7 @@ func (e *Store) CompleteWithOptions(options *generic.StoreOptions) error {
return
err
return
err
}
}
// Resource
p
refix must come from the underlying factory
// Resource
P
refix must come from the underlying factory
prefix
:=
opts
.
ResourcePrefix
prefix
:=
opts
.
ResourcePrefix
if
!
strings
.
HasPrefix
(
prefix
,
"/"
)
{
if
!
strings
.
HasPrefix
(
prefix
,
"/"
)
{
prefix
=
"/"
+
prefix
prefix
=
"/"
+
prefix
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment