Documentation

Index

Constants

View Source
const (
	HttpRetryOnDefault = "gateway-error,connect-failure," +
		"refused-stream"
	HttpRetryOnRetriableStatusCodes = "connect-failure,refused-stream," +
		"retriable-status-codes"
	GrpcRetryOnAll = "cancelled,connect-failure," +
		"gateway-error,refused-stream,reset,resource-exhausted,unavailable"
)

Variables

This section is empty.

Functions

func ConvertBandwidthToKbps

func ConvertBandwidthToKbps(bandwidth string) (uint64, error)

func ConvertPercentage

func ConvertPercentage(percentage *wrappers.DoubleValue) *envoy_type.FractionalPercent

func NewUnexpectedFilterConfigTypeError

func NewUnexpectedFilterConfigTypeError(actual, expected proto.Message) error

func UpdateFilterConfig

func UpdateFilterConfig(filterChain *envoy_listener.FilterChain, filterName string, updateFunc func(proto.Message) error) error

func UpdateHTTPConnectionManager

func UpdateHTTPConnectionManager(filterChain *envoy_listener.FilterChain, updateFunc func(manager *envoy_hcm.HttpConnectionManager) error) error

func UpdateTCPProxy

func UpdateTCPProxy(filterChain *envoy_listener.FilterChain, updateFunc func(*envoy_tcp.TcpProxy) error) error

Types

type AccessLogConfigurer

type AccessLogConfigurer struct {
	Mesh               string
	TrafficDirection   envoy.TrafficDirection
	SourceService      string
	DestinationService string
	Backend            *mesh_proto.LoggingBackend
	Proxy              *core_xds.Proxy
}

type FaultInjectionConfigurer

type FaultInjectionConfigurer struct {
	FaultInjection *mesh_proto.FaultInjection
}

func (*FaultInjectionConfigurer) Configure

func (f *FaultInjectionConfigurer) Configure(filterChain *envoy_listener.FilterChain) error

type FilterChainConfigurer

type FilterChainConfigurer interface {
	// Configure configures a single aspect on a given Envoy filter chain.
	Configure(filterChain *envoy_listener.FilterChain) error
}

    FilterChainConfigurer is responsible for configuring a single aspect of the entire Envoy filter chain, such as TcpProxy filter, RBAC filter, access log, etc.

    type FilterChainMatchConfigurer

    type FilterChainMatchConfigurer struct {
    	ServerNames []string
    }

    func (*FilterChainMatchConfigurer) Configure

    func (f *FilterChainMatchConfigurer) Configure(filterChain *envoy_listener.FilterChain) error

    type GrpcStatsConfigurer

    type GrpcStatsConfigurer struct {
    }

    func (*GrpcStatsConfigurer) Configure

    func (g *GrpcStatsConfigurer) Configure(filterChain *envoy_listener.FilterChain) error

    type HttpAccessLogConfigurer

    type HttpAccessLogConfigurer struct {
    	AccessLogConfigurer
    }

    func (*HttpAccessLogConfigurer) Configure

    func (c *HttpAccessLogConfigurer) Configure(filterChain *envoy_listener.FilterChain) error

    type HttpConnectionManagerConfigurer

    type HttpConnectionManagerConfigurer struct {
    	StatsName string
    }

    func (*HttpConnectionManagerConfigurer) Configure

    type HttpInboundRouteConfigurer

    type HttpInboundRouteConfigurer struct {
    	Service string
    	// Cluster to forward traffic to.
    	Cluster envoy_common.ClusterSubset
    }

    func (*HttpInboundRouteConfigurer) Configure

    func (c *HttpInboundRouteConfigurer) Configure(filterChain *envoy_listener.FilterChain) error

    type HttpOutboundRouteConfigurer

    type HttpOutboundRouteConfigurer struct {
    	Service string
    	Subsets []envoy_common.ClusterSubset
    	DpTags  mesh_proto.MultiValueTagSet
    }

    func (*HttpOutboundRouteConfigurer) Configure

    func (c *HttpOutboundRouteConfigurer) Configure(filterChain *envoy_listener.FilterChain) error

    type HttpStaticRouteConfigurer

    type HttpStaticRouteConfigurer struct {
    	Builder *envoy_routes.RouteConfigurationBuilder
    }

    func (*HttpStaticRouteConfigurer) Configure

    func (c *HttpStaticRouteConfigurer) Configure(filterChain *envoy_listener.FilterChain) error

    type InboundListenerConfigurer

    type InboundListenerConfigurer struct {
    	ListenerName string
    	Address      string
    	Port         uint32
    }

    func (*InboundListenerConfigurer) Configure

    type KafkaConfigurer

    type KafkaConfigurer struct {
    	StatsName string
    }

    func (*KafkaConfigurer) Configure

    func (c *KafkaConfigurer) Configure(filterChain *envoy_listener.FilterChain) error

    type ListenerConfigurer

    type ListenerConfigurer interface {
    	// Configure configures a single aspect on a given Envoy listener.
    	Configure(listener *envoy_listener.Listener) error
    }

      ListenerConfigurer is responsible for configuring a single aspect of the entire Envoy listener, such as filter chain, transparent proxying, etc.

      type MaxConnectAttemptsConfigurer

      type MaxConnectAttemptsConfigurer struct {
      	Retry *core_mesh.RetryResource
      }

      func (*MaxConnectAttemptsConfigurer) Configure

      func (c *MaxConnectAttemptsConfigurer) Configure(
      	filterChain *envoy_listener.FilterChain,
      ) error

      type NetworkAccessLogConfigurer

      type NetworkAccessLogConfigurer struct {
      	AccessLogConfigurer
      }

      func (*NetworkAccessLogConfigurer) Configure

      func (c *NetworkAccessLogConfigurer) Configure(filterChain *envoy_listener.FilterChain) error

      type NetworkRBACConfigurer

      type NetworkRBACConfigurer struct {
      	StatsName  string
      	Permission *mesh_core.TrafficPermissionResource
      }

      func (*NetworkRBACConfigurer) Configure

      func (c *NetworkRBACConfigurer) Configure(filterChain *envoy_listener.FilterChain) error

      type OriginalDstForwarderConfigurer

      type OriginalDstForwarderConfigurer struct {
      }

      func (*OriginalDstForwarderConfigurer) Configure

      type OutboundListenerConfigurer

      type OutboundListenerConfigurer struct {
      	ListenerName string
      	Address      string
      	Port         uint32
      }

      func (*OutboundListenerConfigurer) Configure

      type RetryConfigurer

      type RetryConfigurer struct {
      	Retry    *core_mesh.RetryResource
      	Protocol core_mesh.Protocol
      }

      func (*RetryConfigurer) Configure

      func (c *RetryConfigurer) Configure(
      	filterChain *envoy_listener.FilterChain,
      ) error

      type ServerSideMTLSConfigurer

      type ServerSideMTLSConfigurer struct {
      	Ctx      xds_context.Context
      	Metadata *core_xds.DataplaneMetadata
      }

      func (*ServerSideMTLSConfigurer) Configure

      func (c *ServerSideMTLSConfigurer) Configure(filterChain *envoy_listener.FilterChain) error

      type SourceMatcherConfigurer

      type SourceMatcherConfigurer struct {
      	Address string
      }

      func (*SourceMatcherConfigurer) Configure

      func (c *SourceMatcherConfigurer) Configure(filterChain *envoy_listener.FilterChain) error

      type StaticEndpointConfigurer

      type StaticEndpointConfigurer struct {
      	StatsName   string
      	Path        string
      	ClusterName string
      	RewritePath string
      }

      func (*StaticEndpointConfigurer) Configure

      func (c *StaticEndpointConfigurer) Configure(filterChain *envoy_listener.FilterChain) error

      type TLSInspectorConfigurer

      type TLSInspectorConfigurer struct {
      }

      func (*TLSInspectorConfigurer) Configure

      type TcpProxyConfigurer

      type TcpProxyConfigurer struct {
      	StatsName string
      	// Clusters to forward traffic to.
      	Clusters []envoy_common.ClusterSubset
      }

      func (*TcpProxyConfigurer) Configure

      func (c *TcpProxyConfigurer) Configure(filterChain *envoy_listener.FilterChain) error

      type TracingConfigurer

      type TracingConfigurer struct {
      	Backend *mesh_proto.TracingBackend
      }

      func (*TracingConfigurer) Configure

      func (c *TracingConfigurer) Configure(filterChain *envoy_listener.FilterChain) error

      type TransparentProxyingConfigurer

      type TransparentProxyingConfigurer struct {
      }

      func (*TransparentProxyingConfigurer) Configure