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

package v2

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

Index

Package Files

builder.go util.go

Constants

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"
    // KeyMaxRequestsPerConnection Optional maximum requests for a single upstream connection. This parameter
    // is respected by both the HTTP/1.1 and HTTP/2 connection pool
    // implementations. If not specified, there is no limit. Setting this
    // parameter to 1 will effectively disable keep alive.
    KeyMaxRequestsPerConnection string = "MaxRequestsPerConnection"
    // KeyHealthyPanicThreshold default 50,More than 50% of hosts are ejected and go into panic mode
    // Panic mode will send traffic back to the failed host
    KeyHealthyPanicThreshold string = "HealthyPanicThreshold"
)

Variables

var DefaultLocalhostListenerAddress = "127.0.0.1"

DefaultLocalhostListenerAddress -

var DefaultRateLimitServerClusterName = "rate_limit_service_cluster"

DefaultRateLimitServerClusterName default rate limit server cluster name

func CheckWeightSum Uses

func CheckWeightSum(clusters []*route.WeightedCluster_ClusterWeight, weight uint32) uint32

CheckWeightSum check all cluster weight sum

func ConverTimeDuration Uses

func ConverTimeDuration(second int64) *types.Duration

ConverTimeDuration second

func ConversionUInt32 Uses

func ConversionUInt32(value uint32) *types.UInt32Value

ConversionUInt32 conversion uint32 to proto uint32

func CreatOutlierDetection Uses

func CreatOutlierDetection(options RainbondPluginOptions) *cluster.OutlierDetection

CreatOutlierDetection create up cluster OutlierDetection

func CreateCircuitBreaker Uses

func CreateCircuitBreaker(options RainbondPluginOptions) *cluster.CircuitBreakers

CreateCircuitBreaker create down cluster circuitbreaker

func CreateCluster Uses

func CreateCluster(options ClusterOptions) *apiv2.Cluster

CreateCluster create cluster config

func CreateEDSClusterConfig Uses

func CreateEDSClusterConfig(serviceName string) *apiv2.Cluster_EdsClusterConfig

CreateEDSClusterConfig create grpc eds cluster config

func CreateHTTPConnectionManager Uses

func CreateHTTPConnectionManager(name, statPrefix string, rateOpt *RateLimitOptions, routes ...route.VirtualHost) *http_connection_manager.HttpConnectionManager

CreateHTTPConnectionManager create http connection manager

func CreateHTTPListener Uses

func CreateHTTPListener(name, address, statPrefix string, port uint32, rateOpt *RateLimitOptions, routes ...route.VirtualHost) *apiv2.Listener

CreateHTTPListener create http manager listener

func CreateHTTPRateLimit Uses

func CreateHTTPRateLimit(option RateLimitOptions) *http_rate_limit.RateLimit

CreateHTTPRateLimit create http rate limit

func CreateHeaderMatcher Uses

func CreateHeaderMatcher(header v1.Header) *route.HeaderMatcher

CreateHeaderMatcher create http route config header matcher

func CreateRoute Uses

func CreateRoute(clusterName, prefix string, headers []*route.HeaderMatcher, weight uint32) *route.Route

CreateRoute create http route

func CreateRouteVirtualHost Uses

func CreateRouteVirtualHost(name string, domains []string, rateLimits []*route.RateLimit, routes ...route.Route) *route.VirtualHost

CreateRouteVirtualHost create route virtual host

func CreateSocketAddress Uses

func CreateSocketAddress(protocol, address string, port uint32) core.Address

CreateSocketAddress create socket address

func CreateTCPListener Uses

func CreateTCPListener(name, clusterName, address, statPrefix string, port uint32) *apiv2.Listener

CreateTCPListener listener builder

func MessageToStruct Uses

func MessageToStruct(msg proto.Message) *types.Struct

MessageToStruct converts from proto message to proto Struct

func ParseClustersResource Uses

func ParseClustersResource(resources []types.Any) []v2.Cluster

ParseClustersResource parse envoy xds server response ParseClustersResource

func ParseListenerResource Uses

func ParseListenerResource(resources []types.Any) []v2.Listener

ParseListenerResource parse envoy xds server response ListenersResource

func ParseLocalityLbEndpointsResource Uses

func ParseLocalityLbEndpointsResource(resources []types.Any) []v2.ClusterLoadAssignment

ParseLocalityLbEndpointsResource parse envoy xds server response ParseLocalityLbEndpointsResource

func ParseRouteConfigurationsResource Uses

func ParseRouteConfigurationsResource(resources []types.Any) []v2.RouteConfiguration

ParseRouteConfigurationsResource parse envoy xds server response RouteConfigurationsResource

type ClusterOptions Uses

type ClusterOptions struct {
    Name                     string
    ServiceName              string
    ClusterType              apiv2.Cluster_DiscoveryType
    MaxRequestsPerConnection *uint32
    OutlierDetection         *cluster.OutlierDetection
    CircuitBreakers          *cluster.CircuitBreakers
    Hosts                    []*core.Address
    HealthyPanicThreshold    int64
}

ClusterOptions cluster options

type RainbondInboundPluginOptions Uses

type RainbondInboundPluginOptions struct {
    OpenLimit   bool
    LimitDomain string
}

RainbondInboundPluginOptions rainbond inbound plugin options

func GetRainbondInboundPluginOptions Uses

func GetRainbondInboundPluginOptions(sr map[string]interface{}) (r RainbondInboundPluginOptions)

GetRainbondInboundPluginOptions get rainbond inbound plugin options

type RainbondPluginOptions Uses

type RainbondPluginOptions struct {
    Prefix                   string
    MaxConnections           int
    MaxRequests              int
    MaxPendingRequests       int
    MaxActiveRetries         int
    Headers                  v1.Headers
    Domains                  []string
    Weight                   uint32
    Interval                 int64
    ConsecutiveErrors        int
    BaseEjectionTimeMS       int64
    MaxEjectionPercent       int
    MaxRequestsPerConnection *uint32
    HealthyPanicThreshold    int64
}

RainbondPluginOptions rainbond plugin config struct

func GetOptionValues Uses

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

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

func (RainbondPluginOptions) RouteBasicHash Uses

func (r RainbondPluginOptions) RouteBasicHash() string

RouteBasicHash get basic hash for weight

type RateLimitOptions Uses

type RateLimitOptions struct {
    Enable                bool
    Domain                string
    RateServerClusterName string
    Stage                 uint32
}

RateLimitOptions rate limit options

Package v2 imports 21 packages (graph) and is imported by 2 packages. Updated 2019-06-28. Refresh now. Tools for package owners.