aggregator

package
v0.25.1-rc.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 23, 2022 License: Apache-2.0 Imports: 17 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsLocalAPIService

func IsLocalAPIService(apiServiceName string) bool

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.

func (*Downloader) OpenAPIV3Root added in v0.24.0

func (s *Downloader) OpenAPIV3Root(handler http.Handler) (*handler3.OpenAPIV3Discovery, int, error)

OpenAPIV3Root downloads the OpenAPI V3 root document from an APIService

type NotFoundError added in v0.24.0

type NotFoundError struct {
}

func (*NotFoundError) Error added in v0.24.0

func (e *NotFoundError) Error() string

type SpecProxier added in v0.24.0

type SpecProxier interface {
	AddUpdateAPIService(handler http.Handler, apiService *v1.APIService)
	UpdateAPIServiceSpec(apiServiceName string) error
	RemoveAPIServiceSpec(apiServiceName string)
	GetAPIServiceNames() []string
}

SpecProxier proxies OpenAPI V3 requests to their respective APIService

func BuildAndRegisterAggregator

func BuildAndRegisterAggregator(downloader Downloader, delegationTarget server.DelegationTarget, pathHandler common.PathHandlerByGroupVersion) (SpecProxier, error)

BuildAndRegisterAggregator registered OpenAPI aggregator handler. This function is not thread safe as it only being called on startup.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL