oasparser

package
v0.0.0-...-25e6f9d Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCacheResources

func GetCacheResources(endpoints []*corev3.Address, clusters []*clusterv3.Cluster,
	listeners []*listenerv3.Listener, routeConfigs map[string]*routev3.RouteConfiguration) (
	listenerRes []types.Resource, clusterRes []types.Resource, routeConfigRes []types.Resource,
	endpointRes []types.Resource)

GetCacheResources converts the envoy endpoints, clusters, routes, and listener to the resource type which is the format required for the Xds cache.

The returned resources are listeners, clusters, routeConfigurations, endpoints

func GetEnforcerAPI

func GetEnforcerAPI(adapterInternalAPI *model.AdapterInternalAPI, vhost string) *api.Api

GetEnforcerAPI retrieves the ApiDS object model for a given swagger definition along with the vhost to deploy the API.

func GetEnforcerAPIOperation

func GetEnforcerAPIOperation(operation model.Operation, isMockedAPI bool) *api.Operation

GetEnforcerAPIOperation builds the operation object expected by the proto definition

func GetGlobalClusters

func GetGlobalClusters() ([]*clusterv3.Cluster, []*corev3.Address)

GetGlobalClusters generates initial internal clusters for given environment.

func GetProductionListener

func GetProductionListener(gateway *gwapiv1b1.Gateway, resolvedListenerCerts map[string]map[string][]byte, gwLuaScript string) []*listenerv3.Listener

GetProductionListener generates the listener configurations.

The VirtualHost is named as "default". The provided set of envoy routes will be assigned under the virtual host

The RouteConfiguration is named as "default"

func GetRouteConfigs

func GetRouteConfigs(vhostToRouteArrayMap map[string][]*routev3.Route, routeConfigName string,
	customRateLimitPolicies []*model.CustomRateLimitPolicy) *routev3.RouteConfiguration

GetRouteConfigs generates routesconfiguration configurations.

The VirtualHost is named as "default". The provided set of envoy routes will be assigned under the virtual host

The RouteConfiguration is named as "default"

func UpdateRoutesConfig

func UpdateRoutesConfig(routeConfig *routev3.RouteConfiguration, vhostToRouteArrayMap map[string][]*routev3.Route)

UpdateRoutesConfig updates the existing routes configuration with the provided map of vhost to array of routes. All the already existing routes (within the routeConfiguration) will be removed.

Types

This section is empty.

Directories

Path Synopsis
Package envoyconf generates the envoyconfiguration for listeners, virtual hosts, routes, clusters, and endpoints.
Package envoyconf generates the envoyconfiguration for listeners, virtual hosts, routes, clusters, and endpoints.
Package model contains the implementation of DTOs to convert OpenAPI/Swagger files and create a common model which can represent both types.
Package model contains the implementation of DTOs to convert OpenAPI/Swagger files and create a common model which can represent both types.
Package utils holds the implementation for common utility functions
Package utils holds the implementation for common utility functions

Jump to

Keyboard shortcuts

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