mirror of
https://github.com/kubernetes/client-go.git
synced 2025-06-24 14:12:18 +00:00
remove commented out code
Kubernetes-commit: 53582a0104fb88aacb5f9512e60136e59fc25f8c
This commit is contained in:
parent
305b0bc3db
commit
784e3fbb2f
@ -30,8 +30,6 @@ type gvkParserCache struct {
|
|||||||
// discoveryClient is the client for retrieving the openAPI document and checking
|
// discoveryClient is the client for retrieving the openAPI document and checking
|
||||||
// whether the document has changed recently
|
// whether the document has changed recently
|
||||||
discoveryClient discovery.DiscoveryInterface
|
discoveryClient discovery.DiscoveryInterface
|
||||||
// ttl is how long the openAPI schema should be considered valid
|
|
||||||
ttl time.Duration
|
|
||||||
// mu protects the gvkParser
|
// mu protects the gvkParser
|
||||||
mu sync.Mutex
|
mu sync.Mutex
|
||||||
// gvkParser retrieves the objectType for a given gvk
|
// gvkParser retrieves the objectType for a given gvk
|
||||||
@ -46,20 +44,13 @@ func regenerateGVKParser(dc discovery.DiscoveryInterface) (*fieldmanager.GvkPars
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
//c.lastChecked = time.Now()
|
|
||||||
models, err := proto.NewOpenAPIData(doc)
|
models, err := proto.NewOpenAPIData(doc)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
return fieldmanager.NewGVKParser(models, false)
|
return fieldmanager.NewGVKParser(models, false)
|
||||||
//gvkParser, err := fieldmanager.NewGVKParser(models, false)
|
|
||||||
//if err != nil {
|
|
||||||
// return nil, err
|
|
||||||
//}
|
|
||||||
|
|
||||||
//return gvkParser, nil
|
|
||||||
//return nil
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// objectTypeForGVK retrieves the typed.ParseableType for a given gvk from the cache
|
// objectTypeForGVK retrieves the typed.ParseableType for a given gvk from the cache
|
||||||
|
Loading…
Reference in New Issue
Block a user