envoy

package
v0.0.0-...-a1f2fe4 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2017 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ServiceKey      = "service-key"
	ServiceCluster  = "service-cluster"
	ServiceNode     = "service-node"
	RouteConfigName = "route-config-name"
)

Request parameters for discovery services

View Source
const (
	// MixerCluster is the name of the mixer cluster
	MixerCluster = "mixer_server"

	// MixerFilter name and its attributes
	MixerFilter = "mixer"

	// AttrSourceIP is client source IP
	AttrSourceIP = "source.ip"

	// AttrSourceUID is platform-specific unique identifier for the client instance of the source service
	AttrSourceUID = "source.uid"

	// AttrDestinationIP is the server source IP
	AttrDestinationIP = "destination.ip"

	// AttrDestinationUID is platform-specific unique identifier for the server instance of the target service
	AttrDestinationUID = "destination.uid"

	// AttrDestinationService is name of the target service
	AttrDestinationService = "destination.service"

	// MixerRequestCount is the quota bucket name
	MixerRequestCount = "RequestCount"

	// MixerCheck switches Check call on and off
	MixerCheck = "mixer_check"

	// MixerReport switches Report call on and off
	MixerReport = "mixer_report"

	// DisableTCPCheckCalls switches Check call on and off for tcp listeners
	DisableTCPCheckCalls = "disable_tcp_check_calls"

	// MixerForward switches attribute forwarding on and off
	MixerForward = "mixer_forward"
)
View Source
const (
	// DefaultAccessLog is the name of the log channel (stdout in docker environment)
	DefaultAccessLog = "/dev/stdout"

	// DefaultLbType defines the default load balancer policy
	DefaultLbType = LbTypeRoundRobin

	// LDSName is the name of listener-discovery-service (LDS) cluster
	LDSName = "lds"

	// RDSName is the name of route-discovery-service (RDS) cluster
	RDSName = "rds"

	// SDSName is the name of service-discovery-service (SDS) cluster
	SDSName = "sds"

	// CDSName is the name of cluster-discovery-service (CDS) cluster
	CDSName = "cds"

	// RDSAll is the special name for HTTP PROXY route
	RDSAll = "http_proxy"

	// VirtualListenerName is the name for traffic capture listener
	VirtualListenerName = "virtual"

	// ClusterTypeStrictDNS name for clusters of type 'strict_dns'
	ClusterTypeStrictDNS = "strict_dns"

	// ClusterTypeStatic name for clusters of type 'static'
	ClusterTypeStatic = "static"

	// ClusterTypeOriginalDST name for clusters of type 'original_dst'
	ClusterTypeOriginalDST = "original_dst"

	// LbTypeRoundRobin is the name for roundrobin LB
	LbTypeRoundRobin = "round_robin"

	// LbTypeLeastRequest is the name for least request LB
	LbTypeLeastRequest = "least_request"

	// LbTypeRandom is the name for random LB
	LbTypeRandom = "random"

	// LbTypeOriginalDST is the name for LB of original_dst
	LbTypeOriginalDST = "original_dst_lb"

	// ClusterFeatureHTTP2 is the feature to use HTTP/2 for a cluster
	ClusterFeatureHTTP2 = "http2"

	// HTTPConnectionManager is the name of HTTP filter.
	HTTPConnectionManager = "http_connection_manager"

	// TCPProxyFilter is the name of the TCP Proxy network filter.
	TCPProxyFilter = "tcp_proxy"

	// CORSFilter is the name of the CORS network filter
	CORSFilter = "cors"

	// MongoProxyFilter is the name of the Mongo Proxy network filter.
	MongoProxyFilter = "mongo_proxy"

	// RedisProxyFilter is the name of the Redis Proxy network filter.
	RedisProxyFilter = "redis_proxy"

	// RedisDefaultOpTimeout is the op timeout used for Redis Proxy filter
	// Currently it is set to 30s (conversion happens in the filter)
	// TODO - Allow this to be configured.
	RedisDefaultOpTimeout = 30 * time.Second

	// WildcardAddress binds to all IP addresses
	WildcardAddress = "0.0.0.0"

	// LocalhostAddress for local binding
	LocalhostAddress = "127.0.0.1"

	// EgressTraceOperation denotes the name of trace operation for Envoy
	EgressTraceOperation = "egress"

	// IngressTraceOperation denotes the name of trace operation for Envoy
	IngressTraceOperation = "ingress"

	// ZipkinTraceDriverType denotes the Zipkin HTTP trace driver
	ZipkinTraceDriverType = "zipkin"

	// ZipkinCollectorCluster denotes the cluster where zipkin server is running
	ZipkinCollectorCluster = "zipkin"

	// ZipkinCollectorEndpoint denotes the REST endpoint where Envoy posts Zipkin spans
	ZipkinCollectorEndpoint = "/api/v1/spans"

	// MaxClusterNameLength is the maximum cluster name length
	MaxClusterNameLength = 189 // TODO: use MeshConfig.StatNameLength instead

)
View Source
const (
	// InboundClusterPrefix is the prefix for service clusters co-hosted on the proxy instance
	InboundClusterPrefix = "in."

	// OutboundClusterPrefix is the prefix for service clusters external to the proxy instance
	OutboundClusterPrefix = "out."
)
View Source
const (
	// EpochFileTemplate is a template for the root config JSON
	EpochFileTemplate = "envoy-rev%d.json"
)

Variables

View Source
var ListenersALPNProtocols = []string{"h2", "http/1.1"}

ListenersALPNProtocols denotes the the list of ALPN protocols that the listener should expose

Functions

func GetMixerSAN

func GetMixerSAN(domain, ns string) []string

GetMixerSAN returns the SAN used for mixer mTLS

func GetPilotSAN

func GetPilotSAN(domain, ns string) []string

GetPilotSAN returns the SAN used for pilot mTLS

func NewProxy

func NewProxy(config proxyconfig.ProxyConfig, node string) proxy.Proxy

NewProxy creates an instance of the proxy control commands

Types

type AbortFilter

type AbortFilter struct {
	Percent    int `json:"abort_percent,omitempty"`
	HTTPStatus int `json:"http_status,omitempty"`
}

AbortFilter definition

type AccessLog

type AccessLog struct {
	Path   string `json:"path"`
	Format string `json:"format,omitempty"`
	Filter string `json:"filter,omitempty"`
}

AccessLog definition.

type Admin

type Admin struct {
	AccessLogPath string `json:"access_log_path"`
	Address       string `json:"address"`
}

Admin definition

type AppendedHeader

type AppendedHeader struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

AppendedHeader definition

type CORSPolicy

type CORSPolicy struct {
	Enabled          bool     `json:"enabled,omitempty"`
	AllowCredentials bool     `json:"allow_credentials,omitempty"`
	AllowMethods     string   `json:"allow_methods,omitempty"`
	AllowHeaders     string   `json:"allow_headers,omitempty"`
	ExposeHeaders    string   `json:"expose_headers,omitempty"`
	MaxAge           string   `json:"max_age,omitempty"`
	AllowOrigin      []string `json:"allow_origin,omitempty"`
}

CORSPolicy definition See: https://www.envoyproxy.io/envoy/configuration/http_filters/cors_filter.html#config-http-filters-cors

type CertSource

type CertSource struct {
	// Directory containing certificates
	Directory string
	// Files for certificates
	Files []string
}

CertSource is file source for certificates

type CircuitBreaker

type CircuitBreaker struct {
	Default DefaultCBPriority `json:"default"`
}

CircuitBreaker definition See: https://lyft.github.io/envoy/docs/configuration/cluster_manager/cluster_circuit_breakers.html#circuit-breakers

type Cluster

type Cluster struct {
	Name                     string            `json:"name"`
	ServiceName              string            `json:"service_name,omitempty"`
	ConnectTimeoutMs         int64             `json:"connect_timeout_ms"`
	Type                     string            `json:"type"`
	LbType                   string            `json:"lb_type"`
	MaxRequestsPerConnection int               `json:"max_requests_per_connection,omitempty"`
	Hosts                    []Host            `json:"hosts,omitempty"`
	SSLContext               interface{}       `json:"ssl_context,omitempty"`
	Features                 string            `json:"features,omitempty"`
	CircuitBreaker           *CircuitBreaker   `json:"circuit_breakers,omitempty"`
	OutlierDetection         *OutlierDetection `json:"outlier_detection,omitempty"`
	// contains filtered or unexported fields
}

Cluster definition

type ClusterManager

type ClusterManager struct {
	Clusters Clusters          `json:"clusters"`
	SDS      *DiscoveryCluster `json:"sds,omitempty"`
	CDS      *DiscoveryCluster `json:"cds,omitempty"`
}

ClusterManager definition

type Clusters

type Clusters []*Cluster

Clusters is a collection of clusters

type Config

type Config struct {
	RootRuntime        *RootRuntime   `json:"runtime,omitempty"`
	Listeners          Listeners      `json:"listeners"`
	LDS                *LDSCluster    `json:"lds,omitempty"`
	Admin              Admin          `json:"admin"`
	ClusterManager     ClusterManager `json:"cluster_manager"`
	StatsdUDPIPAddress string         `json:"statsd_udp_ip_address,omitempty"`
	Tracing            *Tracing       `json:"tracing,omitempty"`

	// Special value used to hash all referenced values (e.g. TLS secrets)
	Hash []byte `json:"-"`
}

Config defines the schema for Envoy JSON configuration format

func (*Config) Write

func (conf *Config) Write(w io.Writer) error

func (*Config) WriteFile

func (conf *Config) WriteFile(fname string) error

WriteFile saves config to a file

type Decorator

type Decorator struct {
	Operation string `json:"operation"`
}

Decorator definition

type DefaultCBPriority

type DefaultCBPriority struct {
	MaxConnections     int `json:"max_connections,omitempty"`
	MaxPendingRequests int `json:"max_pending_requests,omitempty"`
	MaxRequests        int `json:"max_requests,omitempty"`
	MaxRetries         int `json:"max_retries,omitempty"`
}

DefaultCBPriority defines the circuit breaker for default cluster priority

type DelayFilter

type DelayFilter struct {
	Type     string `json:"type,omitempty"`
	Percent  int    `json:"fixed_delay_percent,omitempty"`
	Duration int64  `json:"fixed_duration_ms,omitempty"`
}

DelayFilter definition

type DiscoveryCluster

type DiscoveryCluster struct {
	Cluster        *Cluster `json:"cluster"`
	RefreshDelayMs int64    `json:"refresh_delay_ms"`
}

DiscoveryCluster is a service discovery service definition

type DiscoveryService

type DiscoveryService struct {
	proxy.Environment
	// contains filtered or unexported fields
}

DiscoveryService publishes services, clusters, and routes for all proxies

func NewDiscoveryService

func NewDiscoveryService(ctl model.Controller, configCache model.ConfigStoreCache,
	environment proxy.Environment, o DiscoveryServiceOptions) (*DiscoveryService, error)

NewDiscoveryService creates an Envoy discovery service on a given port

func (*DiscoveryService) ClearCacheStats

func (ds *DiscoveryService) ClearCacheStats(_ *restful.Request, _ *restful.Response)

ClearCacheStats clear the statistics for cached discovery responses.

func (*DiscoveryService) GetCacheStats

func (ds *DiscoveryService) GetCacheStats(_ *restful.Request, response *restful.Response)

GetCacheStats returns the statistics for cached discovery responses.

func (*DiscoveryService) ListAllEndpoints

func (ds *DiscoveryService) ListAllEndpoints(request *restful.Request, response *restful.Response)

ListAllEndpoints responds with all Services and is not restricted to a single service-key

func (*DiscoveryService) ListClusters

func (ds *DiscoveryService) ListClusters(request *restful.Request, response *restful.Response)

ListClusters responds to CDS requests for all outbound clusters

func (*DiscoveryService) ListEndpoints

func (ds *DiscoveryService) ListEndpoints(request *restful.Request, response *restful.Response)

ListEndpoints responds to EDS requests

func (*DiscoveryService) ListListeners

func (ds *DiscoveryService) ListListeners(request *restful.Request, response *restful.Response)

ListListeners responds to LDS requests

func (*DiscoveryService) ListRoutes

func (ds *DiscoveryService) ListRoutes(request *restful.Request, response *restful.Response)

ListRoutes responds to RDS requests, used by HTTP routes Routes correspond to HTTP routes and use the listener port as the route name to identify HTTP filters in the config. Service node value holds the local proxy identity.

func (*DiscoveryService) Register

func (ds *DiscoveryService) Register(container *restful.Container)

Register adds routes a web service container

func (*DiscoveryService) Run

func (ds *DiscoveryService) Run()

Run starts the server and blocks

type DiscoveryServiceOptions

type DiscoveryServiceOptions struct {
	Port            int
	EnableProfiling bool
	EnableCaching   bool
}

DiscoveryServiceOptions contains options for create a new discovery service instance.

type FilterFaultConfig

type FilterFaultConfig struct {
	Abort           *AbortFilter `json:"abort,omitempty"`
	Delay           *DelayFilter `json:"delay,omitempty"`
	Headers         Headers      `json:"headers,omitempty"`
	UpstreamCluster string       `json:"upstream_cluster,omitempty"`
}

FilterFaultConfig definition

type FilterMixerConfig

type FilterMixerConfig struct {
	// DEPRECATED: MixerAttributes specifies the static list of attributes that are sent with
	// each request to Mixer.
	MixerAttributes map[string]string `json:"mixer_attributes,omitempty"`

	// DEPRECATED: ForwardAttributes specifies the list of attribute keys and values that
	// are forwarded as an HTTP header to the server side proxy
	ForwardAttributes map[string]string `json:"forward_attributes,omitempty"`

	// DEPRECATED: QuotaName specifies the name of the quota bucket to withdraw tokens from;
	// an empty name means no quota will be charged.
	QuotaName string `json:"quota_name,omitempty"`

	// DEPRECATED: If set to true, disables mixer check calls for TCP connections
	DisableTCPCheckCalls bool `json:"disable_tcp_check_calls,omitempty"`

	// istio.io/api/mixer/v1/config/client configuration protobuf
	// encoded as a generic map using canonical JSON encoding.
	//
	// If `V2` field is not empty, the DEPRECATED fields above should
	// be discarded.
	V2 map[string]interface{} `json:"v2,omitempty"`
}

FilterMixerConfig definition.

NOTE: all fields marked as DEPRECATED are part of the original v1 mixerclient configuration. They are deprecated and will be eventually removed once proxies are updated.

Going forwards all mixerclient configuration should represeted by istio.io/api/mixer/v1/config/client/mixer_filter_config.proto and encoded in the `V2` field below.

type FilterRouterConfig

type FilterRouterConfig struct {
	// DynamicStats defaults to true
	DynamicStats bool `json:"dynamic_stats,omitempty"`
}

FilterRouterConfig definition

type HTTPFilter

type HTTPFilter struct {
	Type   string      `json:"type"`
	Name   string      `json:"name"`
	Config interface{} `json:"config"`
}

HTTPFilter definition

type HTTPFilterConfig

type HTTPFilterConfig struct {
	CodecType         string                 `json:"codec_type"`
	StatPrefix        string                 `json:"stat_prefix"`
	GenerateRequestID bool                   `json:"generate_request_id,omitempty"`
	UseRemoteAddress  bool                   `json:"use_remote_address,omitempty"`
	Tracing           *HTTPFilterTraceConfig `json:"tracing,omitempty"`
	RouteConfig       *HTTPRouteConfig       `json:"route_config,omitempty"`
	RDS               *RDS                   `json:"rds,omitempty"`
	Filters           []HTTPFilter           `json:"filters"`
	AccessLog         []AccessLog            `json:"access_log"`
}

HTTPFilterConfig definition

type HTTPFilterTraceConfig

type HTTPFilterTraceConfig struct {
	OperationName string `json:"operation_name"`
}

HTTPFilterTraceConfig definition

type HTTPRoute

type HTTPRoute struct {
	Runtime *Runtime `json:"runtime,omitempty"`

	Path   string `json:"path,omitempty"`
	Prefix string `json:"prefix,omitempty"`

	PrefixRewrite string `json:"prefix_rewrite,omitempty"`
	HostRewrite   string `json:"host_rewrite,omitempty"`

	PathRedirect string `json:"path_redirect,omitempty"`
	HostRedirect string `json:"host_redirect,omitempty"`

	Cluster          string           `json:"cluster,omitempty"`
	WeightedClusters *WeightedCluster `json:"weighted_clusters,omitempty"`

	Headers      Headers           `json:"headers,omitempty"`
	TimeoutMS    int64             `json:"timeout_ms"`
	RetryPolicy  *RetryPolicy      `json:"retry_policy,omitempty"`
	OpaqueConfig map[string]string `json:"opaque_config,omitempty"`

	AutoHostRewrite  bool `json:"auto_host_rewrite,omitempty"`
	WebsocketUpgrade bool `json:"use_websocket,omitempty"`

	ShadowCluster *ShadowCluster `json:"shadow,omitempty"`

	HeadersToAdd []AppendedHeader `json:"request_headers_to_add,omitempty"`

	CORSPolicy *CORSPolicy `json:"cors,omitempty"`

	Decorator *Decorator `json:"decorator,omitempty"`
	// contains filtered or unexported fields
}

HTTPRoute definition

func (*HTTPRoute) CatchAll

func (route *HTTPRoute) CatchAll() bool

CatchAll returns true if the route matches all requests

func (*HTTPRoute) CombinePathPrefix

func (route *HTTPRoute) CombinePathPrefix(path, prefix string) *HTTPRoute

CombinePathPrefix checks that the route applies for a given path and prefix match and updates the path and the prefix in the route. If the route is incompatible with the path or the prefix, returns nil. Either path or prefix must be set but not both. The resulting route must match exactly the requests that match both the original route and the supplied path and prefix.

type HTTPRouteConfig

type HTTPRouteConfig struct {
	VirtualHosts []*VirtualHost `json:"virtual_hosts"`
}

HTTPRouteConfig definition

type HTTPRouteConfigs

type HTTPRouteConfigs map[int]*HTTPRouteConfig

HTTPRouteConfigs is a map from the port number to the route config

func (HTTPRouteConfigs) EnsurePort

func (routes HTTPRouteConfigs) EnsurePort(port int) *HTTPRouteConfig

EnsurePort creates a route config if necessary

type HTTPTraceDriver

type HTTPTraceDriver struct {
	HTTPTraceDriverType   string                `json:"type"`
	HTTPTraceDriverConfig HTTPTraceDriverConfig `json:"config"`
}

HTTPTraceDriver definition

type HTTPTraceDriverConfig

type HTTPTraceDriverConfig struct {
	CollectorCluster  string `json:"collector_cluster"`
	CollectorEndpoint string `json:"collector_endpoint"`
}

HTTPTraceDriverConfig definition

type HTTPTracer

type HTTPTracer struct {
	HTTPTraceDriver HTTPTraceDriver `json:"driver"`
}

HTTPTracer definition

type Header struct {
	Name  string `json:"name"`
	Value string `json:"value"`
	Regex bool   `json:"regex,omitempty"`
}

Header definition

type Headers

type Headers []Header

Headers sorts headers

func (Headers) Len

func (s Headers) Len() int

func (Headers) Less

func (s Headers) Less(i, j int) bool

func (Headers) Swap

func (s Headers) Swap(i, j int)

type Host

type Host struct {
	URL string `json:"url"`
}

Host definition

type LDSCluster

type LDSCluster struct {
	Cluster        string `json:"cluster"`
	RefreshDelayMs int64  `json:"refresh_delay_ms"`
}

LDSCluster is a reference to LDS cluster by name

type Listener

type Listener struct {
	Address        string           `json:"address"`
	Name           string           `json:"name,omitempty"`
	Filters        []*NetworkFilter `json:"filters"`
	SSLContext     *SSLContext      `json:"ssl_context,omitempty"`
	BindToPort     bool             `json:"bind_to_port"`
	UseOriginalDst bool             `json:"use_original_dst,omitempty"`
}

Listener definition

type Listeners

type Listeners []*Listener

Listeners is a collection of listeners

func (Listeners) GetByAddress

func (listeners Listeners) GetByAddress(addr string) *Listener

GetByAddress returns a listener by its address

type MongoProxyFilterConfig

type MongoProxyFilterConfig struct {
	StatPrefix string `json:"stat_prefix"`
}

MongoProxyFilterConfig definition

type NetworkFilter

type NetworkFilter struct {
	Type   string              `json:"type"`
	Name   string              `json:"name"`
	Config NetworkFilterConfig `json:"config"`
}

NetworkFilter definition

type NetworkFilterConfig

type NetworkFilterConfig interface {
	// contains filtered or unexported methods
}

NetworkFilterConfig is a marker interface

type OutlierDetection

type OutlierDetection struct {
	ConsecutiveErrors  int   `json:"consecutive_5xx,omitempty"`
	IntervalMS         int64 `json:"interval_ms,omitempty"`
	BaseEjectionTimeMS int64 `json:"base_ejection_time_ms,omitempty"`
	MaxEjectionPercent int   `json:"max_ejection_percent,omitempty"`
}

OutlierDetection definition See: https://lyft.github.io/envoy/docs/configuration/cluster_manager/cluster_runtime.html#outlier-detection

type RDS

type RDS struct {
	Cluster         string `json:"cluster"`
	RouteConfigName string `json:"route_config_name"`
	RefreshDelayMs  int64  `json:"refresh_delay_ms"`
}

RDS definition

type RedisConnPool

type RedisConnPool struct {
	OperationTimeoutMS int64 `json:"op_timeout_ms"`
}

RedisConnPool definition

type RedisProxyFilterConfig

type RedisProxyFilterConfig struct {
	ClusterName string         `json:"cluster_name"`
	ConnPool    *RedisConnPool `json:"conn_pool"`
	StatPrefix  string         `json:"stat_prefix"`
}

RedisProxyFilterConfig definition

type RetryPolicy

type RetryPolicy struct {
	Policy          string `json:"retry_on"` //if unset, set to 5xx,connect-failure,refused-stream
	NumRetries      int    `json:"num_retries,omitempty"`
	PerTryTimeoutMS int64  `json:"per_try_timeout_ms,omitempty"`
}

RetryPolicy definition See: https://lyft.github.io/envoy/docs/configuration/http_conn_man/route_config/route.html#retry-policy

type RootRuntime

type RootRuntime struct {
	SymlinkRoot          string `json:"symlink_root"`
	Subdirectory         string `json:"subdirectory"`
	OverrideSubdirectory string `json:"override_subdirectory,omitempty"`
}

RootRuntime definition. See https://envoyproxy.github.io/envoy/configuration/overview/overview.html

type RoutesByPath

type RoutesByPath []*HTTPRoute

RoutesByPath sorts routes by their path and/or prefix, such that: - Exact path routes are "less than" than prefix path routes - Exact path routes are sorted lexicographically - Prefix path routes are sorted anti-lexicographically

This order ensures that prefix path routes do not shadow more specific routes which share the same prefix.

func (RoutesByPath) Len

func (r RoutesByPath) Len() int

func (RoutesByPath) Less

func (r RoutesByPath) Less(i, j int) bool

func (RoutesByPath) Swap

func (r RoutesByPath) Swap(i, j int)

type Runtime

type Runtime struct {
	Key     string `json:"key"`
	Default int    `json:"default"`
}

Runtime definition

type SSLContext

type SSLContext struct {
	CertChainFile            string `json:"cert_chain_file"`
	PrivateKeyFile           string `json:"private_key_file"`
	CaCertFile               string `json:"ca_cert_file,omitempty"`
	RequireClientCertificate bool   `json:"require_client_certificate"`
	ALPNProtocols            string `json:"alpn_protocols,omitempty"`
}

SSLContext definition

type SSLContextExternal

type SSLContextExternal struct {
	CaCertFile string `json:"ca_cert_file,omitempty"`
}

SSLContextExternal definition

type SSLContextWithSAN

type SSLContextWithSAN struct {
	CertChainFile        string   `json:"cert_chain_file"`
	PrivateKeyFile       string   `json:"private_key_file"`
	CaCertFile           string   `json:"ca_cert_file,omitempty"`
	VerifySubjectAltName []string `json:"verify_subject_alt_name"`
}

SSLContextWithSAN definition, VerifySubjectAltName cannot be nil.

type ShadowCluster

type ShadowCluster struct {
	Cluster string `json:"cluster"`
}

ShadowCluster definition See: https://www.envoyproxy.io/envoy/configuration/http_conn_man/route_config/route.html? highlight=shadow#config-http-conn-man-route-table-route-shadow

type TCPProxyFilterConfig

type TCPProxyFilterConfig struct {
	StatPrefix  string          `json:"stat_prefix"`
	RouteConfig *TCPRouteConfig `json:"route_config"`
}

TCPProxyFilterConfig definition

type TCPRoute

type TCPRoute 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"`
	// contains filtered or unexported fields
}

TCPRoute definition

type TCPRouteByRoute

type TCPRouteByRoute []*TCPRoute

TCPRouteByRoute sorts TCP routes over all route sub fields.

func (TCPRouteByRoute) Len

func (r TCPRouteByRoute) Len() int

func (TCPRouteByRoute) Less

func (r TCPRouteByRoute) Less(i, j int) bool

func (TCPRouteByRoute) Swap

func (r TCPRouteByRoute) Swap(i, j int)

type TCPRouteConfig

type TCPRouteConfig struct {
	Routes []*TCPRoute `json:"routes"`
}

TCPRouteConfig (or generalize as RouteConfig or L4RouteConfig for TCP/UDP?)

type Tracing

type Tracing struct {
	HTTPTracer HTTPTracer `json:"http"`
}

Tracing definition

type VirtualHost

type VirtualHost struct {
	Name    string       `json:"name"`
	Domains []string     `json:"domains"`
	Routes  []*HTTPRoute `json:"routes"`
}

VirtualHost definition

type Watcher

type Watcher interface {
	// Run the watcher loop (blocking call)
	Run(context.Context)

	// Reload the agent with the latest configuration
	Reload()
}

Watcher triggers reloads on changes to the proxy config

func NewWatcher

func NewWatcher(config proxyconfig.ProxyConfig, agent proxy.Agent, role proxy.Node,
	certs []CertSource, pilotSAN []string) Watcher

NewWatcher creates a new watcher instance from a proxy agent and a set of monitored certificate paths (directories with files in them)

type WeightedCluster

type WeightedCluster struct {
	Clusters         []*WeightedClusterEntry `json:"clusters"`
	RuntimeKeyPrefix string                  `json:"runtime_key_prefix,omitempty"`
}

WeightedCluster definition See https://envoyproxy.github.io/envoy/configuration/http_conn_man/route_config/route.html

type WeightedClusterEntry

type WeightedClusterEntry struct {
	Name   string `json:"name"`
	Weight int    `json:"weight"`
}

WeightedClusterEntry definition. Describes the format of each entry in the WeightedCluster

Jump to

Keyboard shortcuts

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