mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 11:50:44 +00:00
Merge pull request #49090 from jianglingxia/jlx71815
Automatic merge from submit-queue installer.go amend some comment **What this PR does / why we need it**: **Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes # **Special notes for your reviewer**: **Release note**: ```release-note NONE
This commit is contained in:
commit
d2791d46e3
@ -50,7 +50,7 @@ type realTimeoutFactory struct {
|
|||||||
timeout time.Duration
|
timeout time.Duration
|
||||||
}
|
}
|
||||||
|
|
||||||
// TimeoutChan 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 {
|
||||||
|
@ -84,7 +84,7 @@ var toDiscoveryKubeVerb = map[string]string{
|
|||||||
"WATCHLIST": "watch",
|
"WATCHLIST": "watch",
|
||||||
}
|
}
|
||||||
|
|
||||||
// Installs 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
|
|||||||
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()
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user