i2gw

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2024 License: Apache-2.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
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

GatewayResources contains all Gateway-API objects.

func ToGatewayAPIResources

func ToGatewayAPIResources(ctx context.Context, namespace string, inputFile string, providers []string) ([]GatewayResources, error)

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

type ProviderConf struct {
	Client    client.Client
	Namespace string
}

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.

Directories

Path Synopsis
providers

Jump to

Keyboard shortcuts

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