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
fa6b6012
Commit
fa6b6012
authored
Jul 22, 2017
by
jianglingxia
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
squash the commits into one
parent
5d5d6ca3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
watch.go
staging/src/k8s.io/apiserver/pkg/endpoints/handlers/watch.go
+1
-1
installer.go
staging/src/k8s.io/apiserver/pkg/endpoints/installer.go
+2
-2
No files found.
staging/src/k8s.io/apiserver/pkg/endpoints/handlers/watch.go
View file @
fa6b6012
...
@@ -50,7 +50,7 @@ type realTimeoutFactory struct {
...
@@ -50,7 +50,7 @@ type realTimeoutFactory struct {
timeout
time
.
Duration
timeout
time
.
Duration
}
}
// TimeoutCh
an
returns a channel which will receive something when the watch times out,
// TimeoutCh returns a channel which will receive something when the watch times out,
// and a cleanup function to call when this happens.
// and a cleanup function to call when this happens.
func
(
w
*
realTimeoutFactory
)
TimeoutCh
()
(
<-
chan
time
.
Time
,
func
()
bool
)
{
func
(
w
*
realTimeoutFactory
)
TimeoutCh
()
(
<-
chan
time
.
Time
,
func
()
bool
)
{
if
w
.
timeout
==
0
{
if
w
.
timeout
==
0
{
...
...
staging/src/k8s.io/apiserver/pkg/endpoints/installer.go
View file @
fa6b6012
...
@@ -84,7 +84,7 @@ var toDiscoveryKubeVerb = map[string]string{
...
@@ -84,7 +84,7 @@ var toDiscoveryKubeVerb = map[string]string{
"WATCHLIST"
:
"watch"
,
"WATCHLIST"
:
"watch"
,
}
}
// Install
s
handlers for API resources.
// Install handlers for API resources.
func
(
a
*
APIInstaller
)
Install
(
ws
*
restful
.
WebService
)
(
apiResources
[]
metav1
.
APIResource
,
errors
[]
error
)
{
func
(
a
*
APIInstaller
)
Install
(
ws
*
restful
.
WebService
)
(
apiResources
[]
metav1
.
APIResource
,
errors
[]
error
)
{
errors
=
make
([]
error
,
0
)
errors
=
make
([]
error
,
0
)
...
@@ -841,7 +841,7 @@ func (a *APIInstaller) registerResourceHandlers(path string, storage rest.Storag
...
@@ -841,7 +841,7 @@ func (a *APIInstaller) registerResourceHandlers(path string, storage rest.Storag
return
&
apiResource
,
nil
return
&
apiResource
,
nil
}
}
//
This magic incantation
returns *ptrToObject for an arbitrary pointer
//
indirectArbitraryPointer
returns *ptrToObject for an arbitrary pointer
func
indirectArbitraryPointer
(
ptrToObject
interface
{})
interface
{}
{
func
indirectArbitraryPointer
(
ptrToObject
interface
{})
interface
{}
{
return
reflect
.
Indirect
(
reflect
.
ValueOf
(
ptrToObject
))
.
Interface
()
return
reflect
.
Indirect
(
reflect
.
ValueOf
(
ptrToObject
))
.
Interface
()
}
}
...
...
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