Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsLocalAPIService ¶
IsLocalAPIService returns true for local specs from delegates.
Types ¶
type Downloader ¶
type Downloader struct { }
Downloader is the OpenAPI downloader type. It will try to download spec from /openapi/v3 and /openap/v3/<group>/<version> endpoints.
func NewDownloader ¶
func NewDownloader() Downloader
NewDownloader creates a new OpenAPI Downloader.
type SpecAggregator ¶
type SpecAggregator interface { AddUpdateAPIService(handler http.Handler, apiService *v1.APIService) UpdateAPIServiceSpec(apiServiceName string) error RemoveAPIServiceSpec(apiServiceName string) GetAPIServiceNames() []string }
SpecAggregator calls out to http handlers of APIServices and caches specs. It keeps state of the last known specs including the http etag. TODO(jefftree): remove the downloading and caching and proxy directly to the APIServices. This is possible because we don't have to merge here, which is cpu intensive in v2
func BuildAndRegisterAggregator ¶
func BuildAndRegisterAggregator(downloader Downloader, delegationTarget server.DelegationTarget, pathHandler common.PathHandlerByGroupVersion) (SpecAggregator, error)
BuildAndRegisterAggregator registered OpenAPI aggregator handler. This function is not thread safe as it only being called on startup.