Documentation ¶
Index ¶
- func GetCacheResources(endpoints []*corev3.Address, clusters []*clusterv3.Cluster, ...) (listenerRes []types.Resource, clusterRes []types.Resource, ...)
- func GetEnforcerAPI(mgwSwagger model.MgwSwagger, vhost string) *api.Api
- func GetEnforcerAPIOperation(operation mgw.Operation, isMockedAPI bool) *api.Operation
- func GetGlobalClusters() ([]*clusterv3.Cluster, []*corev3.Address)
- func GetProductionListenerAndRouteConfig(vhostToRouteArrayMap map[string][]*routev3.Route) ([]*listenerv3.Listener, *routev3.RouteConfiguration)
- func GetRoutesClustersEndpoints(mgwSwagger mgw.MgwSwagger, upstreamCerts map[string][]byte, ...) ([]*routev3.Route, []*clusterv3.Cluster, []*corev3.Address, error)
- func UpdateRoutesConfig(routeConfig *routev3.RouteConfiguration, ...)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetCacheResources ¶
func GetCacheResources(endpoints []*corev3.Address, clusters []*clusterv3.Cluster, listeners []*listenerv3.Listener, routeConfig *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(mgwSwagger model.MgwSwagger, 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 ¶
GetEnforcerAPIOperation builds the operation object expected by the proto definition
func GetGlobalClusters ¶
GetGlobalClusters generates initial internal clusters for given environment.
func GetProductionListenerAndRouteConfig ¶
func GetProductionListenerAndRouteConfig(vhostToRouteArrayMap map[string][]*routev3.Route) ([]*listenerv3.Listener, *routev3.RouteConfiguration)
GetProductionListenerAndRouteConfig generates the listener and 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 GetRoutesClustersEndpoints ¶
func GetRoutesClustersEndpoints(mgwSwagger mgw.MgwSwagger, upstreamCerts map[string][]byte, interceptorCerts map[string][]byte, vHost string, organizationID string) ([]*routev3.Route, []*clusterv3.Cluster, []*corev3.Address, error)
GetRoutesClustersEndpoints generates the routes, clusters and endpoints (envoy) when the openAPI Json is provided. For websockets apiJsn created from api.yaml file is considered.
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 operator converts the openAPI v3 and/or v2 content To MgwSwagger objects which is the intermediate representation maintained by the microgateway.
|
Package operator converts the openAPI v3 and/or v2 content To MgwSwagger objects which is the intermediate representation maintained by the microgateway. |
Package utills holds the implementation for common utility functions
|
Package utills holds the implementation for common utility functions |