Documentation ¶
Index ¶
- Constants
- Variables
- type ConfigGeneratorImpl
- func (configgen *ConfigGeneratorImpl) BuildClusters(env model.Environment, proxy model.Proxy) ([]*v2.Cluster, error)
- func (configgen *ConfigGeneratorImpl) BuildListeners(env model.Environment, node model.Proxy) ([]*xdsapi.Listener, error)
- func (_ *ConfigGeneratorImpl) BuildRoutes(env model.Environment, node model.Proxy, routeName string) ([]*xdsapi.RouteConfiguration, error)
- func (configgen *ConfigGeneratorImpl) BuildSidecarOutboundHTTPRouteConfig(env model.Environment, node model.Proxy, ...) *xdsapi.RouteConfiguration
- type DeprecatedFilterConfigInV2
- type DeprecatedTCPProxyFilterConfig
- type DeprecatedTCPRoute
- type DeprecatedTCPRouteByRoute
- type DeprecatedTCPRouteConfig
Constants ¶
const ( // DefaultLbType set to round robin DefaultLbType = networking.LoadBalancerSettings_ROUND_ROBIN // ManagementClusterHostname indicates the hostname used for building inbound clusters for management ports ManagementClusterHostname = "mgmtCluster" )
const ( // HTTPStatPrefix indicates envoy stat prefix for http listeners HTTPStatPrefix = "http" // RDSName is the name of route-discovery-service (RDS) cluster RDSName = "rds" // RDSHttpProxy is the special name for HTTP PROXY route RDSHttpProxy = "http_proxy" // VirtualListenerName is the name for traffic capture listener VirtualListenerName = "virtual" // WildcardAddress binds to all IP addresses WildcardAddress = "0.0.0.0" // LocalhostAddress for local binding LocalhostAddress = "127.0.0.1" )
Variables ¶
var ListenersALPNProtocols = []string{"h2", "http/1.1"}
ListenersALPNProtocols denotes the the list of ALPN protocols that the listener should expose
Functions ¶
This section is empty.
Types ¶
type ConfigGeneratorImpl ¶
type ConfigGeneratorImpl struct { // List of plugins that modify code generated by this config generator Plugins []plugin.Plugin }
func NewConfigGenerator ¶
func NewConfigGenerator(plugins []plugin.Plugin) *ConfigGeneratorImpl
func (*ConfigGeneratorImpl) BuildClusters ¶
func (configgen *ConfigGeneratorImpl) BuildClusters(env model.Environment, proxy model.Proxy) ([]*v2.Cluster, error)
BuildClusters returns the list of clusters for the given proxy. This is the CDS output For outbound: Cluster for each service/subset hostname or cidr with SNI set to service hostname Cluster type based on resolution For inbound (sidecar only): Cluster for each inbound endpoint port and for each service port
func (*ConfigGeneratorImpl) BuildListeners ¶
func (configgen *ConfigGeneratorImpl) BuildListeners(env model.Environment, node model.Proxy) ([]*xdsapi.Listener, error)
BuildListeners produces a list of listeners and referenced clusters for all proxies
func (*ConfigGeneratorImpl) BuildRoutes ¶
func (_ *ConfigGeneratorImpl) BuildRoutes(env model.Environment, node model.Proxy, routeName string) ([]*xdsapi.RouteConfiguration, error)
TODO
func (*ConfigGeneratorImpl) BuildSidecarOutboundHTTPRouteConfig ¶
func (configgen *ConfigGeneratorImpl) BuildSidecarOutboundHTTPRouteConfig(env model.Environment, node model.Proxy, proxyInstances []*model.ServiceInstance, services []*model.Service, routeName string) *xdsapi.RouteConfiguration
BuildSidecarOutboundHTTPRouteConfig builds an outbound HTTP Route for sidecar.
type DeprecatedFilterConfigInV2 ¶
type DeprecatedFilterConfigInV2 struct { DeprecatedV1 bool `json:"deprecated_v1"` Value *DeprecatedTCPProxyFilterConfig `json:"value"` }
DeprecatedFilterConfigInV2 definition
type DeprecatedTCPProxyFilterConfig ¶
type DeprecatedTCPProxyFilterConfig struct { StatPrefix string `json:"stat_prefix"` RouteConfig *DeprecatedTCPRouteConfig `json:"route_config"` }
DeprecatedTCPProxyFilterConfig definition
type DeprecatedTCPRoute ¶
type DeprecatedTCPRoute struct { Cluster string `json:"cluster"` DestinationIPList []string `json:"destination_ip_list,omitempty"` DestinationPorts string `json:"destination_ports,omitempty"` SourceIPList []string `json:"source_ip_list,omitempty"` SourcePorts string `json:"source_ports,omitempty"` }
DeprecatedTCPRoute definition
type DeprecatedTCPRouteByRoute ¶
type DeprecatedTCPRouteByRoute []*DeprecatedTCPRoute
DeprecatedTCPRouteByRoute sorts TCP routes over all route sub fields.
func (DeprecatedTCPRouteByRoute) Len ¶
func (r DeprecatedTCPRouteByRoute) Len() int
func (DeprecatedTCPRouteByRoute) Less ¶
func (r DeprecatedTCPRouteByRoute) Less(i, j int) bool
func (DeprecatedTCPRouteByRoute) Swap ¶
func (r DeprecatedTCPRouteByRoute) Swap(i, j int)
type DeprecatedTCPRouteConfig ¶
type DeprecatedTCPRouteConfig struct {
Routes []*DeprecatedTCPRoute `json:"routes"`
}
DeprecatedTCPRouteConfig (or generalize as RouteConfig or L4RouteConfig for TCP/UDP?)