Documentation ¶
Index ¶
- func AppendHeader(key, value string) *envoy_api_v2_core.HeaderValueOption
- func CORSPolicy(cp *dag.CORSPolicy) *envoy_api_v2_route.CorsPolicy
- func CORSVirtualHost(hostname string, corspolicy *envoy_api_v2_route.CorsPolicy, ...) *envoy_api_v2_route.VirtualHost
- func Cluster(c *dag.Cluster) *v2.Cluster
- func ClusterCommonLBConfig() *v2.Cluster_CommonLbConfig
- func ClusterDiscoveryType(t v2.Cluster_DiscoveryType) *v2.Cluster_Type
- func ClusterLoadAssignment(name string, addrs ...*envoy_api_v2_core.Address) *v2.ClusterLoadAssignment
- func ConfigSource(cluster string) *envoy_api_v2_core.ConfigSource
- func ContainsFallbackFilterChain(filterchains []*envoy_api_v2_listener.FilterChain) bool
- func DownstreamTLSContext(serverSecret *dag.Secret, ...) *envoy_api_v2_auth.DownstreamTlsContext
- func DownstreamTLSTransportSocket(tls *envoy_api_v2_auth.DownstreamTlsContext) *envoy_api_v2_core.TransportSocket
- func Endpoints(addrs ...*envoy_api_v2_core.Address) []*envoy_api_v2_endpoint.LocalityLbEndpoints
- func ExtensionCluster(ext *dag.ExtensionCluster) *v2.Cluster
- func FileAccessLogEnvoy(path string) []*accesslog.AccessLog
- func FileAccessLogJSON(path string, keys []string) []*accesslog.AccessLog
- func FilterChain(filters ...*envoy_api_v2_listener.Filter) *envoy_api_v2_listener.FilterChain
- func FilterChainTLS(domain string, downstream *envoy_api_v2_auth.DownstreamTlsContext, ...) *envoy_api_v2_listener.FilterChain
- func FilterChainTLSFallback(downstream *envoy_api_v2_auth.DownstreamTlsContext, ...) *envoy_api_v2_listener.FilterChain
- func FilterChains(filters ...*envoy_api_v2_listener.Filter) []*envoy_api_v2_listener.FilterChain
- func FilterExternalAuthz(authzClusterName string, failOpen bool, timeout timeout.Setting) *http.HttpFilter
- func FilterMisdirectedRequests(fqdn string) *http.HttpFilter
- func Filters(filters ...*envoy_api_v2_listener.Filter) []*envoy_api_v2_listener.Filter
- func HTTPConnectionManager(routename string, accesslogger []*accesslog.AccessLog, ...) *envoy_api_v2_listener.Filter
- func HTTPConnectionManagerBuilder() *httpConnectionManagerBuilder
- func HeaderValueList(hvm map[string]string, app bool) []*envoy_api_v2_core.HeaderValueOption
- func Headers(first *envoy_api_v2_core.HeaderValueOption, ...) []*envoy_api_v2_core.HeaderValueOption
- func LBEndpoint(addr *envoy_api_v2_core.Address) *envoy_api_v2_endpoint.LbEndpoint
- func Listener(name, address string, port int, lf []*envoy_api_v2_listener.ListenerFilter, ...) *v2.Listener
- func ListenerFilters(filters ...*envoy_api_v2_listener.ListenerFilter) []*envoy_api_v2_listener.ListenerFilter
- func ProtoNamesForVersions(versions ...HTTPVersionType) []string
- func ProxyProtocol() *envoy_api_v2_listener.ListenerFilter
- func RouteAuthzContext(settings map[string]string) *any.Any
- func RouteAuthzDisabled() *any.Any
- func RouteConfiguration(name string, virtualhosts ...*envoy_api_v2_route.VirtualHost) *v2.RouteConfiguration
- func RouteMatch(route *dag.Route) *envoy_api_v2_route.RouteMatch
- func RouteRoute(r *dag.Route) *envoy_api_v2_route.Route_Route
- func Secret(s *dag.Secret) *envoy_api_v2_auth.Secret
- func SocketAddress(address string, port int) *envoy_api_v2_core.Address
- func StaticClusterLoadAssignment(service *dag.Service) *v2.ClusterLoadAssignment
- func StatsListener(address string, port int) *v2.Listener
- func TCPKeepaliveSocketOptions() []*envoy_api_v2_core.SocketOption
- func TCPProxy(statPrefix string, proxy *dag.TCPProxy, accesslogger []*accesslog.AccessLog) *envoy_api_v2_listener.Filter
- func TLSInspector() *envoy_api_v2_listener.ListenerFilter
- func UpgradeHTTPS() *envoy_api_v2_route.Route_Redirect
- func UpstreamTLSContext(peerValidationContext *dag.PeerValidationContext, sni string, ...) *envoy_api_v2_auth.UpstreamTlsContext
- func UpstreamTLSTransportSocket(tls *envoy_api_v2_auth.UpstreamTlsContext) *envoy_api_v2_core.TransportSocket
- func VirtualHost(hostname string, routes ...*envoy_api_v2_route.Route) *envoy_api_v2_route.VirtualHost
- func WeightedEndpoints(weight uint32, addrs ...*envoy_api_v2_core.Address) []*envoy_api_v2_endpoint.LocalityLbEndpoints
- func WriteBootstrap(c *envoy.BootstrapConfig) error
- type HTTPVersionType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendHeader ¶
func AppendHeader(key, value string) *envoy_api_v2_core.HeaderValueOption
func CORSPolicy ¶
func CORSPolicy(cp *dag.CORSPolicy) *envoy_api_v2_route.CorsPolicy
CORSPolicy returns a *v2.CORSPolicy
func CORSVirtualHost ¶
func CORSVirtualHost(hostname string, corspolicy *envoy_api_v2_route.CorsPolicy, routes ...*envoy_api_v2_route.Route) *envoy_api_v2_route.VirtualHost
CORSVirtualHost creates a new route.VirtualHost with a CORS policy.
func ClusterCommonLBConfig ¶
func ClusterCommonLBConfig() *v2.Cluster_CommonLbConfig
ClusterCommonLBConfig creates a *v2.Cluster_CommonLbConfig with HealthyPanicThreshold disabled.
func ClusterDiscoveryType ¶
func ClusterDiscoveryType(t v2.Cluster_DiscoveryType) *v2.Cluster_Type
ClusterDiscoveryType returns the type of a ClusterDiscovery as a Cluster_type.
func ClusterLoadAssignment ¶
func ClusterLoadAssignment(name string, addrs ...*envoy_api_v2_core.Address) *v2.ClusterLoadAssignment
ClusterLoadAssignment returns a *v2.ClusterLoadAssignment with a single LocalityLbEndpoints of the supplied addresses.
func ConfigSource ¶
func ConfigSource(cluster string) *envoy_api_v2_core.ConfigSource
ConfigSource returns a *envoy_api_v2_core.ConfigSource for cluster.
func ContainsFallbackFilterChain ¶
func ContainsFallbackFilterChain(filterchains []*envoy_api_v2_listener.FilterChain) bool
func DownstreamTLSContext ¶
func DownstreamTLSContext(serverSecret *dag.Secret, tlsMinProtoVersion envoy_api_v2_auth.TlsParameters_TlsProtocol, peerValidationContext *dag.PeerValidationContext, alpnProtos ...string) *envoy_api_v2_auth.DownstreamTlsContext
DownstreamTLSContext creates a new DownstreamTlsContext.
func DownstreamTLSTransportSocket ¶
func DownstreamTLSTransportSocket(tls *envoy_api_v2_auth.DownstreamTlsContext) *envoy_api_v2_core.TransportSocket
DownstreamTLSTransportSocket returns a custom transport socket using the DownstreamTlsContext provided.
func Endpoints ¶
func Endpoints(addrs ...*envoy_api_v2_core.Address) []*envoy_api_v2_endpoint.LocalityLbEndpoints
Endpoints returns a slice of LocalityLbEndpoints. The slice contains one entry, with one LbEndpoint per *envoy_api_v2_core.Address supplied.
func ExtensionCluster ¶
func ExtensionCluster(ext *dag.ExtensionCluster) *v2.Cluster
ExtensionCluster builds a v2.Cluster struct for the given extension service.
func FileAccessLogEnvoy ¶
FileAccessLogEnvoy returns a new file based access log filter that will output Envoy's default access logs.
func FileAccessLogJSON ¶
FileAccessLogJSON returns a new file based access log filter that will log in JSON format
func FilterChain ¶
func FilterChain(filters ...*envoy_api_v2_listener.Filter) *envoy_api_v2_listener.FilterChain
FilterChain retruns a *envoy_api_v2_listener.FilterChain for the supplied filters.
func FilterChainTLS ¶
func FilterChainTLS(domain string, downstream *envoy_api_v2_auth.DownstreamTlsContext, filters []*envoy_api_v2_listener.Filter) *envoy_api_v2_listener.FilterChain
FilterChainTLS returns a TLS enabled envoy_api_v2_listener.FilterChain.
func FilterChainTLSFallback ¶
func FilterChainTLSFallback(downstream *envoy_api_v2_auth.DownstreamTlsContext, filters []*envoy_api_v2_listener.Filter) *envoy_api_v2_listener.FilterChain
FilterChainTLSFallback returns a TLS enabled envoy_api_v2_listener.FilterChain conifgured for FallbackCertificate.
func FilterChains ¶
func FilterChains(filters ...*envoy_api_v2_listener.Filter) []*envoy_api_v2_listener.FilterChain
FilterChains returns a []*envoy_api_v2_listener.FilterChain for the supplied filters.
func FilterExternalAuthz ¶
func FilterExternalAuthz(authzClusterName string, failOpen bool, timeout timeout.Setting) *http.HttpFilter
FilterExternalAuthz returns an `ext_authz` filter configured with the requested parameters.
func FilterMisdirectedRequests ¶
func FilterMisdirectedRequests(fqdn string) *http.HttpFilter
func Filters ¶
func Filters(filters ...*envoy_api_v2_listener.Filter) []*envoy_api_v2_listener.Filter
Filters returns a []*envoy_api_v2_listener.Filter for the supplied filters.
func HTTPConnectionManager ¶
func HTTPConnectionManager(routename string, accesslogger []*accesslog.AccessLog, requestTimeout time.Duration) *envoy_api_v2_listener.Filter
HTTPConnectionManager creates a new HTTP Connection Manager filter for the supplied route, access log, and client request timeout.
func HTTPConnectionManagerBuilder ¶
func HTTPConnectionManagerBuilder() *httpConnectionManagerBuilder
func HeaderValueList ¶
func HeaderValueList(hvm map[string]string, app bool) []*envoy_api_v2_core.HeaderValueOption
HeaderValueList creates a list of Envoy HeaderValueOptions from the provided map.
func Headers ¶
func Headers(first *envoy_api_v2_core.HeaderValueOption, rest ...*envoy_api_v2_core.HeaderValueOption) []*envoy_api_v2_core.HeaderValueOption
func LBEndpoint ¶
func LBEndpoint(addr *envoy_api_v2_core.Address) *envoy_api_v2_endpoint.LbEndpoint
LBEndpoint creates a new LbEndpoint.
func Listener ¶
func Listener(name, address string, port int, lf []*envoy_api_v2_listener.ListenerFilter, filters ...*envoy_api_v2_listener.Filter) *v2.Listener
Listener returns a new v2.Listener for the supplied address, port, and filters.
func ListenerFilters ¶
func ListenerFilters(filters ...*envoy_api_v2_listener.ListenerFilter) []*envoy_api_v2_listener.ListenerFilter
ListenerFilters returns a []*envoy_api_v2_listener.ListenerFilter for the supplied listener filters.
func ProtoNamesForVersions ¶
func ProtoNamesForVersions(versions ...HTTPVersionType) []string
ProtoNamesForVersions returns the slice of ALPN protocol names for the give HTTP versions.
func ProxyProtocol ¶
func ProxyProtocol() *envoy_api_v2_listener.ListenerFilter
ProxyProtocol returns a new Proxy Protocol listener filter.
func RouteAuthzContext ¶
RouteAuthzContext returns a per-route config to pass the given context entries in the check request.
func RouteAuthzDisabled ¶
RouteAuthzDisabled returns a per-route config to disable authorization.
func RouteConfiguration ¶
func RouteConfiguration(name string, virtualhosts ...*envoy_api_v2_route.VirtualHost) *v2.RouteConfiguration
RouteConfiguration returns a *v2.RouteConfiguration.
func RouteMatch ¶
func RouteMatch(route *dag.Route) *envoy_api_v2_route.RouteMatch
RouteMatch creates a *envoy_api_v2_route.RouteMatch for the supplied *dag.Route.
func RouteRoute ¶
func RouteRoute(r *dag.Route) *envoy_api_v2_route.Route_Route
RouteRoute creates a *envoy_api_v2_route.Route_Route for the services supplied. If len(services) is greater than one, the route's action will be a weighted cluster.
func Secret ¶
func Secret(s *dag.Secret) *envoy_api_v2_auth.Secret
Secret creates new envoy_api_v2_auth.Secret from secret.
func SocketAddress ¶
func SocketAddress(address string, port int) *envoy_api_v2_core.Address
SocketAddress creates a new TCP envoy_api_v2_core.Address.
func StaticClusterLoadAssignment ¶
func StaticClusterLoadAssignment(service *dag.Service) *v2.ClusterLoadAssignment
StaticClusterLoadAssignment creates a *v2.ClusterLoadAssignment pointing to the external DNS address of the service
func StatsListener ¶
StatsListener returns a *v2.Listener configured to serve prometheus metrics on /stats.
func TCPKeepaliveSocketOptions ¶
func TCPKeepaliveSocketOptions() []*envoy_api_v2_core.SocketOption
func TCPProxy ¶
func TCPProxy(statPrefix string, proxy *dag.TCPProxy, accesslogger []*accesslog.AccessLog) *envoy_api_v2_listener.Filter
TCPProxy creates a new TCPProxy filter.
func TLSInspector ¶
func TLSInspector() *envoy_api_v2_listener.ListenerFilter
TLSInspector returns a new TLS inspector listener filter.
func UpgradeHTTPS ¶
func UpgradeHTTPS() *envoy_api_v2_route.Route_Redirect
UpgradeHTTPS returns a route Action that redirects the request to HTTPS.
func UpstreamTLSContext ¶
func UpstreamTLSContext(peerValidationContext *dag.PeerValidationContext, sni string, clientSecret *dag.Secret, alpnProtocols ...string) *envoy_api_v2_auth.UpstreamTlsContext
UpstreamTLSContext creates an envoy_api_v2_auth.UpstreamTlsContext. By default UpstreamTLSContext returns a HTTP/1.1 TLS enabled context. A list of additional ALPN protocols can be provided.
func UpstreamTLSTransportSocket ¶
func UpstreamTLSTransportSocket(tls *envoy_api_v2_auth.UpstreamTlsContext) *envoy_api_v2_core.TransportSocket
UpstreamTLSTransportSocket returns a custom transport socket using the UpstreamTlsContext provided.
func VirtualHost ¶
func VirtualHost(hostname string, routes ...*envoy_api_v2_route.Route) *envoy_api_v2_route.VirtualHost
VirtualHost creates a new route.VirtualHost.
func WeightedEndpoints ¶
func WeightedEndpoints(weight uint32, addrs ...*envoy_api_v2_core.Address) []*envoy_api_v2_endpoint.LocalityLbEndpoints
func WriteBootstrap ¶
func WriteBootstrap(c *envoy.BootstrapConfig) error
WriteBootstrap writes bootstrap configuration to files.
Types ¶
type HTTPVersionType ¶
type HTTPVersionType = http.HttpConnectionManager_CodecType
const ( HTTPVersionAuto HTTPVersionType = http.HttpConnectionManager_AUTO HTTPVersion1 HTTPVersionType = http.HttpConnectionManager_HTTP1 HTTPVersion2 HTTPVersionType = http.HttpConnectionManager_HTTP2 HTTPVersion3 HTTPVersionType = http.HttpConnectionManager_HTTP3 )
func CodecForVersions ¶
func CodecForVersions(versions ...HTTPVersionType) HTTPVersionType
CodecForVersions determines a single Envoy HTTP codec constant that support all the given HTTP protocol versions.