Documentation ¶
Index ¶
- Variables
- func GetSupportedProviders() []string
- type CustomResourceReader
- type FeatureParser
- type GatewayResources
- type ImplementationSpecificHTTPPathTypeMatchConverter
- type InputResources
- type Provider
- type ProviderConf
- type ProviderConstructor
- type ProviderImplementationSpecificOptions
- type ProviderName
- type ResourceConverter
Constants ¶
This section is empty.
Variables ¶
var ProviderConstructorByName = map[ProviderName]ProviderConstructor{}
ProviderConstructorByName is a map of ProviderConstructor functions by a provider name. Different Provider implementations should add their construction func at startup.
Functions ¶
func GetSupportedProviders ¶
func GetSupportedProviders() []string
GetSupportedProviders returns the names of all providers that are supported now
Types ¶
type CustomResourceReader ¶
type CustomResourceReader interface { // ReadResourcesFromCluster reads custom resources associated with // the underlying Provider implementation from the kubernetes cluster. ReadResourcesFromCluster(ctx context.Context) error // ReadResourcesFromFile reads custom resources associated with // the underlying Provider implementation from the file. ReadResourcesFromFile(ctx context.Context, filename string) error }
type FeatureParser ¶
type FeatureParser func(InputResources, *GatewayResources) field.ErrorList
FeatureParser is a function that reads the InputResources, and applies the appropriate modifications to the GatewayResources.
Different FeatureParsers will run in undetermined order. The function must modify / create only the required fields of the gateway resources and nothing else.
type GatewayResources ¶
type GatewayResources struct { Gateways map[types.NamespacedName]gatewayv1.Gateway GatewayClasses map[types.NamespacedName]gatewayv1.GatewayClass HTTPRoutes map[types.NamespacedName]gatewayv1.HTTPRoute TLSRoutes map[types.NamespacedName]gatewayv1alpha2.TLSRoute TCPRoutes map[types.NamespacedName]gatewayv1alpha2.TCPRoute UDPRoutes map[types.NamespacedName]gatewayv1alpha2.UDPRoute ReferenceGrants map[types.NamespacedName]gatewayv1alpha2.ReferenceGrant }
GatewayResources contains all Gateway-API objects.
func ToGatewayAPIResources ¶
type ImplementationSpecificHTTPPathTypeMatchConverter ¶ added in v0.2.0
type ImplementationSpecificHTTPPathTypeMatchConverter func(*gatewayv1.HTTPPathMatch)
ImplementationSpecificHTTPPathTypeMatchConverter is an option to customize the ingress implementationSpecific match type conversion.
type InputResources ¶
type InputResources struct {
Ingresses []networkingv1.Ingress
}
InputResources contains all Ingress objects.
type Provider ¶
type Provider interface { CustomResourceReader ResourceConverter }
The Provider interface specifies the required functionality which needs to be implemented by every concrete Ingress/Gateway-API provider, in order for it to be used.
type ProviderConf ¶
ProviderConf contains all the configuration required for every concrete Provider implementation.
type ProviderConstructor ¶
type ProviderConstructor func(conf *ProviderConf) Provider
ProviderConstructor is a construction function that constructs concrete implementations of the Provider interface.
type ProviderImplementationSpecificOptions ¶ added in v0.2.0
type ProviderImplementationSpecificOptions struct {
ToImplementationSpecificHTTPPathTypeMatch ImplementationSpecificHTTPPathTypeMatchConverter
}
ProviderImplementationSpecificOptions contains customized implementation-specific fields and functions. These will be used by the common package to customize the provider-specific behavior for all the implementation-specific fields of the ingress API.
type ProviderName ¶
type ProviderName string
ProviderName is a string alias that stores the concrete Provider name.
type ResourceConverter ¶
type ResourceConverter interface { // ToGatewayAPIResources converts the received InputResources associated // with the Provider into GatewayResources. ToGatewayAPI(resources InputResources) (GatewayResources, field.ErrorList) }
The ResourceConverter interface specifies all the implemented Gateway API resource conversion functions.