rainbond: github.com/goodrain/rainbond/node/core/envoy/v1 Index | Files

package v1

import "github.com/goodrain/rainbond/node/core/envoy/v1"


Package Files

builder.go keys.go resource.go


const (
    //KeyPrefix request path prefix
    KeyPrefix string = "Prefix"
    //KeyHeaders request http headers
    KeyHeaders string = "Headers"
    //KeyDomains request domains
    KeyDomains string = "Domains"
    //KeyMaxConnections The maximum number of connections that Envoy will make to the upstream cluster. If not specified, the default is 1024.
    KeyMaxConnections string = "MaxConnections"
    //KeyMaxPendingRequests The maximum number of pending requests that Envoy will allow to the upstream cluster. If not specified, the default is 1024
    KeyMaxPendingRequests string = "MaxPendingRequests"
    //KeyMaxRequests The maximum number of parallel requests that Envoy will make to the upstream cluster. If not specified, the default is 1024.
    KeyMaxRequests string = "MaxRequests"
    //KeyMaxActiveRetries  The maximum number of parallel retries that Envoy will allow to the upstream cluster. If not specified, the default is 3.
    KeyMaxActiveRetries string = "MaxActiveRetries"
    //KeyUpStream upStream
    KeyUpStream string = "upStream"
    //KeyDownStream downStream
    KeyDownStream string = "downStream"
    //KeyWeight WEIGHT
    KeyWeight string = "Weight"
    //KeyWeightModel MODEL_WEIGHT
    KeyWeightModel string = "weight_model"
    //KeyPrefixModel MODEL_PREFIX
    KeyPrefixModel string = "prefix_model"
    //KeyIntervalMS IntervalMS key
    KeyIntervalMS string = "IntervalMS"
    //KeyConsecutiveErrors ConsecutiveErrors key
    KeyConsecutiveErrors string = "ConsecutiveErrors"
    //KeyBaseEjectionTimeMS BaseEjectionTimeMS key
    KeyBaseEjectionTimeMS string = "BaseEjectionTimeMS"
    //KeyMaxEjectionPercent MaxEjectionPercent key
    KeyMaxEjectionPercent string = "MaxEjectionPercent"
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"

    // ClusterTypeSDS name for clusters of type 'sds'
    ClusterTypeSDS = "sds"

    // LbTypeRoundRobin is the name for round-robin LB
    LbTypeRoundRobin = "round_robin"

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

    // LbTypeRingHash is the name for ring hash LB
    LbTypeRingHash = "ring_hash"

    // 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 = ""

    // LocalhostAddress for local binding
    LocalhostAddress = ""

    // 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

    // HeaderMethod is the method header.
    HeaderMethod = ":method"
    // HeaderAuthority is the authority header.
    HeaderAuthority = ":authority"
    // HeaderScheme is the scheme header.
    HeaderScheme = ":scheme"
    // MixerFilter name and its attributes
    MixerFilter = "mixer"


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

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

var NetworkFilterTypes = map[string]reflect.Type{
    RedisProxyFilter:      reflect.TypeOf(RedisProxyFilterConfig{}),
    CORSFilter:            reflect.TypeOf(CORSFilterConfig{}),
    MongoProxyFilter:      reflect.TypeOf(MongoProxyFilterConfig{}),
    TCPProxyFilter:        reflect.TypeOf(TCPProxyFilterConfig{}),
    HTTPConnectionManager: reflect.TypeOf(HTTPFilterConfig{}),
    MixerFilter:           reflect.TypeOf(FilterMixerConfig{}),

NetworkFilterTypes maps filter names to types of structs that implement them. It is used when unmarshaling JSON data. To add your own NetworkFilter types, add additional entries to this map prior to calling json.Unmarshal.

var (
    // ValidateClusters is an environment variable that can be set to false to disable
    // cluster validation in RDS, in case problems are discovered.
    ValidateClusters = true

func GetOptionValues Uses

func GetOptionValues(kind string, sr map[string]interface{}) interface{}

GetOptionValues get value from options if not exist,return default value

type AbortFilter Uses

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

AbortFilter definition

type AccessLog Uses

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

AccessLog definition.

type Admin Uses

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

Admin definition

type AppendedHeader Uses

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

AppendedHeader definition

type CDSCluter Uses

type CDSCluter struct {
    Clusters Clusters `json:"clusters"`

CDSCluter is result struct for cds api

type CORSFilterConfig Uses

type CORSFilterConfig struct{}

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

func (*CORSFilterConfig) IsNetworkFilterConfig Uses

func (*CORSFilterConfig) IsNetworkFilterConfig()

IsNetworkFilterConfig marks CORSFilterConfig as an implementation of NetworkFilterConfig

type CORSPolicy Uses

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           int      `json:"max_age,string,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 CircuitBreaker Uses

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

func CreateCircuitBreaker Uses

func CreateCircuitBreaker(options map[string]interface{}) *CircuitBreaker

CreateCircuitBreaker create circuitBreaker https://www.envoyproxy.io/docs/envoy/latest/api-v1/cluster_manager/cluster_circuit_breakers#config-cluster-manager-cluster-circuit-breakers-v1

type Cluster Uses

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"`

Cluster definition

type ClusterManager Uses

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

ClusterManager definition

type Clusters Uses

type Clusters []*Cluster

Clusters is a collection of clusters

func (*Clusters) Append Uses

func (c *Clusters) Append(new Clusters)

Append append some clusters

func (Clusters) Normalize Uses

func (c Clusters) Normalize() Clusters

Normalize deduplicates and sorts clusters by name

type Config Uses

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

type Decorator Uses

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

Decorator definition

type DefaultCBPriority Uses

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

DefaultCBPriority defines the circuit breaker for default cluster priority

type DelayFilter Uses

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 DiscoverHost Uses

type DiscoverHost struct {
    Address string `json:"ip_address"`
    Port    int    `json:"port"`
    Tags    *Tags  `json:"tags,omitempty"`

DiscoverHost is hosts that make up the service.

type DiscoverHosts Uses

type DiscoverHosts []*DiscoverHost

DiscoverHosts is a collection of DiscoverHost

type DiscoveryCluster Uses

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

DiscoveryCluster is a service discovery service definition

type FilterFaultConfig Uses

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 Uses

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.

func (*FilterMixerConfig) IsNetworkFilterConfig Uses

func (*FilterMixerConfig) IsNetworkFilterConfig()

IsNetworkFilterConfig marks FilterMixerConfig as an implementation of NetworkFilterConfig

type FilterRouterConfig Uses

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

FilterRouterConfig definition

type HTTPFilter Uses

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

HTTPFilter definition

type HTTPFilterConfig Uses

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,omitempty"`

HTTPFilterConfig definition

func (*HTTPFilterConfig) IsNetworkFilterConfig Uses

func (*HTTPFilterConfig) IsNetworkFilterConfig()

IsNetworkFilterConfig marks HTTPFilterConfig as an implementation of NetworkFilterConfig

type HTTPFilterTraceConfig Uses

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

HTTPFilterTraceConfig definition

type HTTPRoute Uses

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

    Path   string `json:"path,omitempty"`
    Prefix string `json:"prefix,omitempty"`
    Regex  string `json:"regex,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"`

    // clusters contains the set of referenced clusters in the route; the field is special
    // and used only to aggregate cluster information after composing routes
    Clusters Clusters `json:"-"`
    // contains filtered or unexported fields

HTTPRoute definition

func (*HTTPRoute) BasicHash Uses

func (route *HTTPRoute) BasicHash() string

BasicHash returns hash string by route path\prefix\header

func (*HTTPRoute) CatchAll Uses

func (route *HTTPRoute) CatchAll() bool

CatchAll returns true if the route matches all requests

func (*HTTPRoute) CombinePathPrefix Uses

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.

func (*HTTPRoute) Redirect Uses

func (route *HTTPRoute) Redirect() bool

Redirect returns true if route contains redirect logic

type HTTPRouteConfig Uses

type HTTPRouteConfig struct {
    ValidateClusters bool           `json:"validate_clusters"`
    VirtualHosts     []*VirtualHost `json:"virtual_hosts"`

HTTPRouteConfig definition

func (*HTTPRouteConfig) Clusters Uses

func (rc *HTTPRouteConfig) Clusters() Clusters

Clusters returns the clusters for the given route config.

func (*HTTPRouteConfig) Normalize Uses

func (rc *HTTPRouteConfig) Normalize() *HTTPRouteConfig

Normalize normalizes the route config.

type HTTPRouteConfigs Uses

type HTTPRouteConfigs map[int]*HTTPRouteConfig

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

func (HTTPRouteConfigs) Clusters Uses

func (routes HTTPRouteConfigs) Clusters() Clusters

Clusters returns the clusters corresponding to the given routes.

func (HTTPRouteConfigs) Combine Uses

func (routes HTTPRouteConfigs) Combine() *HTTPRouteConfig

Combine creates a new route config that is the union of all HTTP routes. note that the virtual hosts without an explicit port suffix (IP:PORT) are stripped for all routes except the route for port 80.

func (HTTPRouteConfigs) EnsurePort Uses

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

EnsurePort creates a route config if necessary

func (HTTPRouteConfigs) Normalize Uses

func (routes HTTPRouteConfigs) Normalize() HTTPRouteConfigs

Normalize normalizes the route configs.

type HTTPTraceDriver Uses

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

HTTPTraceDriver definition

type HTTPTraceDriverConfig Uses

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

HTTPTraceDriverConfig definition

type HTTPTracer Uses

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 Uses

type Headers []Header

Headers sorts headers

func (Headers) Len Uses

func (s Headers) Len() int

func (Headers) Less Uses

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

func (Headers) Swap Uses

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

type Host Uses

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

Host definition

type LDSCluster Uses

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

LDSCluster is a reference to LDS cluster by name

type LDSListener Uses

type LDSListener struct {
    Listeners Listeners `json:"listeners"`

LDSListener is result struct for lds api

type Listener Uses

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

func CreateHTTPCommonListener Uses

func CreateHTTPCommonListener(name string, vh ...*VirtualHost) *Listener

CreateHTTPCommonListener create simple http common listener listen port 80

func CreateTCPCommonListener Uses

func CreateTCPCommonListener(listenerName, clusterName string, address string) *Listener

CreateTCPCommonListener create tcp simple common listener listen the specified port associate the specified cluster.

type Listeners Uses

type Listeners []*Listener

Listeners is a collection of listeners

func (*Listeners) Append Uses

func (l *Listeners) Append(new Listeners)

Append append some listeners

func (Listeners) GetByAddress Uses

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

GetByAddress returns a listener by its address

type MongoProxyFilterConfig Uses

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

MongoProxyFilterConfig definition

func (*MongoProxyFilterConfig) IsNetworkFilterConfig Uses

func (*MongoProxyFilterConfig) IsNetworkFilterConfig()

IsNetworkFilterConfig marks MongoProxyFilterConfig as an implementation of NetworkFilterConfig

type NetworkFilter Uses

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

NetworkFilter definition

func (*NetworkFilter) UnmarshalJSON Uses

func (nf *NetworkFilter) UnmarshalJSON(b []byte) error

UnmarshalJSON handles custom unmarshal logic for the NetworkFilter struct. This is needed because the config field depends on the filter name.

type NetworkFilterConfig Uses

type NetworkFilterConfig interface {

NetworkFilterConfig is a marker interface

type OutlierDetection Uses

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

func CreatOutlierDetection Uses

func CreatOutlierDetection(options map[string]interface{}) *OutlierDetection

CreatOutlierDetection create outlierDetection https://www.envoyproxy.io/docs/envoy/latest/api-v1/cluster_manager/cluster_outlier_detection#config-cluster-manager-cluster-outlier-detection

type RDS Uses

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

RDS definition

type RedisConnPool Uses

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

RedisConnPool definition

type RedisProxyFilterConfig Uses

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

RedisProxyFilterConfig definition

func (*RedisProxyFilterConfig) IsNetworkFilterConfig Uses

func (*RedisProxyFilterConfig) IsNetworkFilterConfig()

IsNetworkFilterConfig marks RedisProxyFilterConfig as an implementation of NetworkFilterConfig

type RetryPolicy Uses

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 Uses

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 Uses

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 Uses

func (r RoutesByPath) Len() int

func (RoutesByPath) Less Uses

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

func (RoutesByPath) Swap Uses

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

type Runtime Uses

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

Runtime definition

type SDSHost Uses

type SDSHost struct {
    Hosts DiscoverHosts `json:"hosts"`

SDSHost is result struct for sds api

type SSLContext Uses

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 Uses

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

SSLContextExternal definition

type SSLContextWithSAN Uses

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 Uses

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 Uses

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

TCPProxyFilterConfig definition

func (*TCPProxyFilterConfig) IsNetworkFilterConfig Uses

func (*TCPProxyFilterConfig) IsNetworkFilterConfig()

IsNetworkFilterConfig marks TCPProxyFilterConfig as an implementation of NetworkFilterConfig

type TCPRoute Uses

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 Uses

type TCPRouteByRoute []*TCPRoute

TCPRouteByRoute sorts TCP routes over all route sub fields.

func (TCPRouteByRoute) Len Uses

func (r TCPRouteByRoute) Len() int

func (TCPRouteByRoute) Less Uses

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

func (TCPRouteByRoute) Swap Uses

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

type TCPRouteConfig Uses

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

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

type Tags Uses

type Tags struct {
    AZ     string `json:"az,omitempty"`
    Canary bool   `json:"canary,omitempty"`

    // Weight is an integer in the range [1, 100] or empty
    Weight int `json:"load_balancing_weight,omitempty"`

Tags is Discover host tags

type Tracing Uses

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

Tracing definition

type VirtualHost Uses

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

VirtualHost definition

func UniqVirtualHost Uses

func UniqVirtualHost(vhs []*VirtualHost) (revhs []*VirtualHost)

UniqVirtualHost according to the rules of VirtualHost in http route merge the VirtualHost that have same domain if have same domain, prifix, path and header,support weight

type WeightedCluster Uses

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 Uses

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

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

Package v1 imports 12 packages (graph) and is imported by 2 packages. Updated 2018-09-01. Refresh now. Tools for package owners.