kubernetes/staging/src/k8s.io/kube-aggregator/pkg/controllers/openapi/aggregator/downloader.go

type CacheableDownloader

type cacheableDownloader

// NewCacheableDownloader creates a downloader that also returns the etag, making it useful to use as a cached dependency.
func NewCacheableDownloader(apiServiceName string, downloader *Downloader, handler http.Handler) CacheableDownloader {}

func (d *cacheableDownloader) UpdateHandler(handler http.Handler) {}

func (d *cacheableDownloader) Get() (*spec.Swagger, string, error) {}

func (d *cacheableDownloader) get() (*spec.Swagger, string, error) {}

type Downloader

// NewDownloader creates a new OpenAPI Downloader.
func NewDownloader() Downloader {}

func (s *Downloader) handlerWithUser(handler http.Handler, info user.Info) http.Handler {}

func etagFor(data []byte) string {}

// Download downloads openAPI spec from /openapi/v2 endpoint of the given handler.
// httpStatus is only valid if err == nil
func (s *Downloader) Download(handler http.Handler, etag string) (returnSpec *spec.Swagger, newEtag string, httpStatus int, err error) {}