repo

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2023 License: Apache-2.0 Imports: 46 Imported by: 0

Documentation

Overview

Package repo implements broadcast's methods.

Index

Constants

View Source
const (
	// ServerType is the type identifier for the ADS server
	ServerType = "pipy-Repo"
)

Variables

This section is empty.

Functions

func GetProxyFromPod

func GetProxyFromPod(pod *v1.Pod) (*pipy.Proxy, error)

GetProxyFromPod infers and creates a Proxy data structure from a Pod. This is a temporary workaround as proxy is required and expected in any vertical call, however snapshotcache has no need to provide visibility on proxies whatsoever. All verticals use the proxy structure to infer the pod later, so the actual only mandatory data for the verticals to be functional is the common name, which links proxy <-> pod

func GetProxyFromVm added in v1.2.0

func GetProxyFromVm(vm *machinev1alpha1.VirtualMachine) (*pipy.Proxy, error)

GetProxyFromVm infers and creates a Proxy data structure from a VM. This is a temporary workaround as proxy is required and expected in any vertical call, however snapshotcache has no need to provide visibility on proxies whatsoever. All verticals use the proxy structure to infer the VM later, so the actual only mandatory data for the verticals to be functional is the common name, which links proxy <-> VM

func GetProxyUUIDFromPod

func GetProxyUUIDFromPod(pod *v1.Pod) (string, error)

GetProxyUUIDFromPod infers and creates a Proxy UUID from a Pod.

func GetProxyUUIDFromVm added in v1.2.0

func GetProxyUUIDFromVm(vm *machinev1alpha1.VirtualMachine) (string, error)

GetProxyUUIDFromVm infers and creates a Proxy UUID from a VM.

Types

type Address

type Address string

Address is a string wrapper type

type AllowedEndpoints

type AllowedEndpoints map[Address]ServiceName

AllowedEndpoints is a wrapper type of map[Address]ServiceName

type Certificate

type Certificate struct {
	// If issued by fsm ca
	FsmIssued *bool `json:"FsmIssued,omitempty"`

	// The CommonName of the certificate
	CommonName *certificate.CommonName `json:"CommonName,omitempty"`

	// SubjectAltNames defines the Subject Alternative Names (domain names and IP addresses) secured by the certificate.
	SubjectAltNames []string `json:"SubjectAltNames,omitempty"`

	// When the cert expires
	Expiration string

	// PEM encoded Certificate and Key (byte arrays)
	CertChain  string
	PrivateKey string

	// Certificate authority signing this certificate
	IssuingCA string
}

Certificate represents an x509 certificate.

type ClusterConfigs

type ClusterConfigs struct {
	Endpoints          *WeightedEndpoints  `json:"Endpoints"`
	ConnectionSettings *ConnectionSettings `json:"ConnectionSettings,omitempty"`
	RetryPolicy        *RetryPolicy        `json:"RetryPolicy,omitempty"`
	SourceCert         *Certificate        `json:"SourceCert,omitempty"`
}

ClusterConfigs represents the configs of Cluster

type ClusterName

type ClusterName string

ClusterName is a string wrapper type

type ConnectionSettings

type ConnectionSettings struct {
	// TCP specifies the TCP level connection settings.
	// Applies to both TCP and HTTP connections.
	// +optional
	TCP *TCPConnectionSettings `json:"tcp,omitempty"`

	// HTTP specifies the HTTP level connection settings.
	// +optional
	HTTP *HTTPConnectionSettings `json:"http,omitempty"`
}

ConnectionSettings defines the connection settings for an upstream host.

type DestinationIPRange

type DestinationIPRange string

DestinationIPRange is a string wrapper type

type DestinationIPRanges

type DestinationIPRanges map[DestinationIPRange]*DestinationSecuritySpec

DestinationIPRanges is a wrapper type of map[DestinationIPRange]*DestinationSecuritySpec

type DestinationSecuritySpec

type DestinationSecuritySpec struct {
	SourceCert *Certificate `json:"SourceCert,omitempty"`
}

DestinationSecuritySpec is the security spec of destination

type EgressGatewayClusterConfigs

type EgressGatewayClusterConfigs struct {
	ClusterConfigs
	Mode string `json:"Mode"`
}

EgressGatewayClusterConfigs represents the configs of Egress Gateway Cluster

type FeatureFlags

type FeatureFlags struct {
	EnableSidecarActiveHealthChecks bool
	EnableAutoDefaultRoute          bool
}

FeatureFlags represents the flags of feature

type ForwardTrafficMatches

type ForwardTrafficMatches map[string]WeightedClusters

ForwardTrafficMatches is a wrapper type of map[Port]WeightedClusters

type ForwardTrafficPolicy

type ForwardTrafficPolicy struct {
	ForwardMatches ForwardTrafficMatches                        `json:"ForwardMatches"`
	EgressGateways map[ClusterName]*EgressGatewayClusterConfigs `json:"EgressGateways"`
}

ForwardTrafficPolicy represents the policy of Egress Gateway

type HTTPCircuitBreaking

type HTTPCircuitBreaking struct {
	// StatTimeWindow specifies statistical time period of circuit breaking
	StatTimeWindow *float64 `json:"StatTimeWindow"`

	// MinRequestAmount specifies minimum number of requests (in an active statistic time span) that can trigger circuit breaking.
	MinRequestAmount uint32 `json:"MinRequestAmount"`

	// DegradedTimeWindow specifies the duration of circuit breaking
	DegradedTimeWindow *float64 `json:"DegradedTimeWindow"`

	// SlowTimeThreshold specifies the time threshold of slow request
	SlowTimeThreshold *float64 `json:"SlowTimeThreshold,omitempty"`

	// SlowAmountThreshold specifies the amount threshold of slow request
	SlowAmountThreshold *uint32 `json:"SlowAmountThreshold,omitempty"`

	// SlowRatioThreshold specifies the ratio threshold of slow request
	SlowRatioThreshold *float32 `json:"SlowRatioThreshold,omitempty"`

	// ErrorAmountThreshold specifies the amount threshold of error request
	ErrorAmountThreshold *uint32 `json:"ErrorAmountThreshold,omitempty"`

	// ErrorRatioThreshold specifies the ratio threshold of error request
	ErrorRatioThreshold *float32 `json:"ErrorRatioThreshold,omitempty"`

	// DegradedStatusCode specifies the degraded http status code of circuit breaking
	DegradedStatusCode *int32 `json:"DegradedStatusCode,omitempty"`

	// DegradedResponseContent specifies the degraded http response content of circuit breaking
	DegradedResponseContent *string `json:"DegradedResponseContent,omitempty"`
}

HTTPCircuitBreaking defines the HTTP Circuit Breaking settings for an upstream host.

type HTTPConnectionSettings

type HTTPConnectionSettings struct {
	// MaxRequests specifies the maximum number of parallel requests
	// allowed to the upstream host.
	// Defaults to 4294967295 (2^32 - 1) if not specified.
	// +optional
	MaxRequests *uint32 `json:"MaxRequests,omitempty"`

	// MaxRequestsPerConnection specifies the maximum number of requests
	// per connection allowed to the upstream host.
	// Defaults to unlimited if not specified.
	// +optional
	MaxRequestsPerConnection *uint32 `json:"MaxRequestsPerConnection,omitempty"`

	// MaxPendingRequests specifies the maximum number of pending HTTP
	// requests allowed to the upstream host. For HTTP/2 connections,
	// if `maxRequestsPerConnection` is not configured, all requests will
	// be multiplexed over the same connection so this circuit breaker
	// will only be hit when no connection is already established.
	// Defaults to 4294967295 (2^32 - 1) if not specified.
	// +optional
	MaxPendingRequests *uint32 `json:"MaxPendingRequests,omitempty"`

	// MaxRetries specifies the maximum number of parallel retries
	// allowed to the upstream host.
	// Defaults to 4294967295 (2^32 - 1) if not specified.
	// +optional
	MaxRetries *uint32 `json:"MaxRetries,omitempty"`

	// CircuitBreaking specifies the HTTP connection circuit breaking setting.
	CircuitBreaking *HTTPCircuitBreaking `json:"CircuitBreaking,omitempty"`
}

HTTPConnectionSettings defines the HTTP connection settings for an upstream host.

type HTTPHeaderValue

type HTTPHeaderValue struct {
	// Name defines the name of the HTTP header.
	Name string `json:"Name"`

	// Value defines the value of the header corresponding to the name key.
	Value string `json:"Value"`
}

HTTPHeaderValue defines an HTTP header name/value pair

type HTTPHostPort

type HTTPHostPort string

HTTPHostPort is a string wrapper type

type HTTPHostPort2Service

type HTTPHostPort2Service map[HTTPHostPort]HTTPRouteRuleName

HTTPHostPort2Service is a wrapper type of map[HTTPHostPort]HTTPRouteRuleName

type HTTPLocalRateLimit

type HTTPLocalRateLimit struct {
	// Requests defines the number of requests allowed
	// per unit of time before rate limiting occurs.
	Requests uint32 `json:"Requests"`

	// StatTimeWindow specifies statistical time period of local rate limit
	StatTimeWindow float64 `json:"StatTimeWindow"`

	// Burst defines the number of requests above the baseline
	// rate that are allowed in a short period of time.
	// +optional
	Burst uint32 `json:"Burst,omitempty"`

	// ResponseStatusCode defines the HTTP status code to use for responses
	// to rate limited requests. Code must be in the 400-599 (inclusive)
	// error range. If not specified, a default of 429 (Too Many Requests) is used.
	// +optional
	ResponseStatusCode uint32 `json:"ResponseStatusCode,omitempty"`

	// ResponseHeadersToAdd defines the list of HTTP headers that should be
	// added to each response for requests that have been rate limited.
	// +optional
	ResponseHeadersToAdd []HTTPHeaderValue `json:"ResponseHeadersToAdd,omitempty"`
}

HTTPLocalRateLimit defines the local rate limiting specification for the upstream host at the HTTP level.

type HTTPMatchRule

type HTTPMatchRule struct {
	Path    URIPathValue
	Type    URIMatchType
	Headers Headers `json:"Headers"`
	Methods Methods `json:"Methods"`
	// contains filtered or unexported fields
}

HTTPMatchRule http match rule

type HTTPPerRouteRateLimit

type HTTPPerRouteRateLimit struct {
	// Local defines the local rate limiting specification
	// applied per HTTP route.
	Local *HTTPLocalRateLimit `json:"Local,omitempty"`
}

HTTPPerRouteRateLimit defines the rate limiting specification per HTTP route.

type HTTPRateLimit

type HTTPRateLimit struct {
	// Local specified the local rate limiting specification
	// for the upstream host.
	// Local rate limiting is enforced directly by the upstream
	// host without any involvement of a global rate limiting service.
	// This is applied as a token bucket rate limiter.
	// +optional
	Local *HTTPLocalRateLimit `json:"Local,omitempty"`
}

HTTPRateLimit defines the rate limiting specification for the upstream host.

type HTTPRouteRule

type HTTPRouteRule struct {
	HTTPMatchRule
	TargetClusters  WeightedClusters `json:"TargetClusters"`
	AllowedServices Services         `json:"AllowedServices"`
}

HTTPRouteRule http route rule

type HTTPRouteRuleName

type HTTPRouteRuleName string

HTTPRouteRuleName is a string wrapper type

type Header string

Header is a string wrapper type

type HeaderRegexp

type HeaderRegexp string

HeaderRegexp is a string wrapper type

type Headers

type Headers map[Header]HeaderRegexp

Headers is a wrapper type of map[Header]HeaderRegexp

type InboundHTTPRouteRule

type InboundHTTPRouteRule struct {
	HTTPRouteRule
	RateLimit *HTTPPerRouteRateLimit `json:"RateLimit"`
}

InboundHTTPRouteRule http route rule

type InboundHTTPRouteRuleSlice

type InboundHTTPRouteRuleSlice []*InboundHTTPRouteRule

InboundHTTPRouteRuleSlice http route rule array

func (InboundHTTPRouteRuleSlice) Len

func (irrs InboundHTTPRouteRuleSlice) Len() int

func (InboundHTTPRouteRuleSlice) Less

func (irrs InboundHTTPRouteRuleSlice) Less(i, j int) bool

func (InboundHTTPRouteRuleSlice) Swap

func (irrs InboundHTTPRouteRuleSlice) Swap(i, j int)

type InboundHTTPRouteRules

type InboundHTTPRouteRules struct {
	RouteRules InboundHTTPRouteRuleSlice `json:"RouteRules"`
	Pluggable
	HTTPRateLimit    *HTTPRateLimit   `json:"RateLimit"`
	AllowedEndpoints AllowedEndpoints `json:"AllowedEndpoints"`
}

InboundHTTPRouteRules is a wrapper type

type InboundHTTPServiceRouteRules

type InboundHTTPServiceRouteRules map[HTTPRouteRuleName]*InboundHTTPRouteRules

InboundHTTPServiceRouteRules is a wrapper type of map[HTTPRouteRuleName]*InboundHTTPRouteRules

type InboundTCPServiceRouteRules

type InboundTCPServiceRouteRules struct {
	TargetClusters WeightedClusters `json:"TargetClusters"`
	Pluggable
}

InboundTCPServiceRouteRules is a wrapper type

type InboundTrafficMatch

type InboundTrafficMatch struct {
	Port                  Port                         `json:"Port"`
	Protocol              Protocol                     `json:"Protocol"`
	SourceIPRanges        SourceIPRanges               `json:"SourceIPRanges"`
	HTTPHostPort2Service  HTTPHostPort2Service         `json:"HttpHostPort2Service"`
	HTTPServiceRouteRules InboundHTTPServiceRouteRules `json:"HttpServiceRouteRules"`
	TCPServiceRouteRules  *InboundTCPServiceRouteRules `json:"TcpServiceRouteRules"`
	TCPRateLimit          *TCPRateLimit                `json:"RateLimit"`
}

InboundTrafficMatch represents the match of InboundTraffic

type InboundTrafficMatches

type InboundTrafficMatches map[Port]*InboundTrafficMatch

InboundTrafficMatches is a wrapper type of map[Port]*InboundTrafficMatch

type InboundTrafficPolicy

type InboundTrafficPolicy struct {
	TrafficMatches  InboundTrafficMatches             `json:"TrafficMatches"`
	ClustersConfigs map[ClusterName]*WeightedEndpoint `json:"ClustersConfigs"`
}

InboundTrafficPolicy represents the policy of InboundTraffic

type LocalDNSProxy

type LocalDNSProxy struct {
	// UpstreamDNSServers defines upstream DNS servers for local DNS Proxy.
	UpstreamDNSServers *UpstreamDNSServers `json:"UpstreamDNSServers,omitempty"`
}

LocalDNSProxy is the type to represent FSM's local DNS proxy configuration.

type MeshConfigSpec

type MeshConfigSpec struct {
	SidecarLogLevel string
	SidecarTimeout  int
	Traffic         TrafficSpec
	FeatureFlags    FeatureFlags
	Probes          struct {
		ReadinessProbes []v1.Probe `json:"ReadinessProbes,omitempty"`
		LivenessProbes  []v1.Probe `json:"LivenessProbes,omitempty"`
		StartupProbes   []v1.Probe `json:"StartupProbes,omitempty"`
	}
	ClusterSet    map[string]string
	LocalDNSProxy *LocalDNSProxy    `json:"LocalDNSProxy,omitempty"`
	Observability ObservabilitySpec `json:"Observability,omitempty"`
}

MeshConfigSpec represents the spec of mesh config

type Method

type Method string

Method is a string wrapper type

type Methods

type Methods []Method

Methods is a wrapper type of []Method

type ObservabilitySpec added in v1.1.2

type ObservabilitySpec struct {
	// Tracing defines OSM's tracing configuration.
	Tracing *TracingSpec `json:"tracing,omitempty"`

	// RemoteLogging defines OSM's remote logging configuration.
	RemoteLogging *RemoteLoggingSpec `json:"remoteLogging,omitempty"`
}

ObservabilitySpec is the type to represent OSM's observability configurations.

type OutboundHTTPRouteRule

type OutboundHTTPRouteRule struct {
	HTTPRouteRule
}

OutboundHTTPRouteRule http route rule

type OutboundHTTPRouteRuleSlice

type OutboundHTTPRouteRuleSlice []*OutboundHTTPRouteRule

OutboundHTTPRouteRuleSlice http route rule array

func (*OutboundHTTPRouteRuleSlice) Len

func (hrrs *OutboundHTTPRouteRuleSlice) Len() int

func (*OutboundHTTPRouteRuleSlice) Less

func (hrrs *OutboundHTTPRouteRuleSlice) Less(i, j int) bool

func (*OutboundHTTPRouteRuleSlice) Swap

func (hrrs *OutboundHTTPRouteRuleSlice) Swap(i, j int)

type OutboundHTTPRouteRules

type OutboundHTTPRouteRules struct {
	RouteRules           OutboundHTTPRouteRuleSlice `json:"RouteRules"`
	ServiceIdentity      identity.ServiceIdentity
	EgressForwardGateway *string
	Pluggable
}

OutboundHTTPRouteRules is a wrapper type

type OutboundHTTPServiceRouteRules

type OutboundHTTPServiceRouteRules map[HTTPRouteRuleName]*OutboundHTTPRouteRules

OutboundHTTPServiceRouteRules is a wrapper type of map[HTTPRouteRuleName]*HTTPRouteRules

type OutboundTCPServiceRouteRules

type OutboundTCPServiceRouteRules struct {
	TargetClusters       WeightedClusters `json:"TargetClusters"`
	AllowedEgressTraffic bool
	EgressForwardGateway *string
	Pluggable
}

OutboundTCPServiceRouteRules is a wrapper type

type OutboundTrafficMatch

type OutboundTrafficMatch struct {
	DestinationIPRanges   DestinationIPRanges
	Port                  Port                          `json:"Port"`
	Protocol              Protocol                      `json:"Protocol"`
	HTTPHostPort2Service  HTTPHostPort2Service          `json:"HttpHostPort2Service"`
	HTTPServiceRouteRules OutboundHTTPServiceRouteRules `json:"HttpServiceRouteRules"`
	TCPServiceRouteRules  *OutboundTCPServiceRouteRules `json:"TcpServiceRouteRules"`
}

OutboundTrafficMatch represents the match of OutboundTraffic

type OutboundTrafficMatchSlice

type OutboundTrafficMatchSlice []*OutboundTrafficMatch

OutboundTrafficMatchSlice is a wrapper type of []*OutboundTrafficMatch

func (OutboundTrafficMatchSlice) Len

func (otms OutboundTrafficMatchSlice) Len() int

Len is the number of elements in the collection.

func (OutboundTrafficMatchSlice) Less

func (otms OutboundTrafficMatchSlice) Less(i, j int) bool

Less reports whether the element with index i must sort before the element with index j.

func (OutboundTrafficMatchSlice) Swap

func (otms OutboundTrafficMatchSlice) Swap(i, j int)

Swap swaps the elements with indexes i and j.

type OutboundTrafficMatches

type OutboundTrafficMatches map[Port]OutboundTrafficMatchSlice

OutboundTrafficMatches is a wrapper type of map[Port][]*OutboundTrafficMatch

func (*OutboundTrafficMatches) Sort

func (otms *OutboundTrafficMatches) Sort()

Sort sorts data. It makes one call to data.Len to determine n and O(n*log(n)) calls to data.Less and data.Swap. The sort is not guaranteed to be stable.

type OutboundTrafficPolicy

type OutboundTrafficPolicy struct {
	TrafficMatches  OutboundTrafficMatches          `json:"TrafficMatches"`
	ClustersConfigs map[ClusterName]*ClusterConfigs `json:"ClustersConfigs"`
	// contains filtered or unexported fields
}

OutboundTrafficPolicy represents the policy of OutboundTraffic

type PipyConf

type PipyConf struct {
	Ts               *time.Time
	Version          *string
	Metrics          bool
	Spec             MeshConfigSpec
	Certificate      *Certificate
	Inbound          *InboundTrafficPolicy    `json:"Inbound"`
	Outbound         *OutboundTrafficPolicy   `json:"Outbound"`
	Forward          *ForwardTrafficPolicy    `json:"Forward"`
	AllowedEndpoints map[string]string        `json:"AllowedEndpoints"`
	Chains           map[string][]string      `json:"Chains,omitempty"`
	DNSResolveDB     map[string][]interface{} `json:"DNSResolveDB,omitempty"`
	// contains filtered or unexported fields
}

PipyConf is a policy used by pipy sidecar

type PipyConfGeneratorJob

type PipyConfGeneratorJob struct {
	// contains filtered or unexported fields
}

PipyConfGeneratorJob is the job to generate pipy policy json

func (*PipyConfGeneratorJob) GetDoneCh

func (job *PipyConfGeneratorJob) GetDoneCh() <-chan struct{}

GetDoneCh returns the channel, which when closed, indicates the job has been finished.

func (*PipyConfGeneratorJob) JobName

func (job *PipyConfGeneratorJob) JobName() string

JobName implementation for this job, for logging purposes

func (*PipyConfGeneratorJob) Run

func (job *PipyConfGeneratorJob) Run()

Run is the logic unit of job

type Pluggable

type Pluggable struct {
	Plugins map[string]*runtime.RawExtension `json:"Plugins"`
}

Pluggable is the base struct supported plugin

type PluginSlice

type PluginSlice []trafficpolicy.Plugin

PluginSlice plugin array

func (*PluginSlice) Len

func (ps *PluginSlice) Len() int

func (*PluginSlice) Less

func (ps *PluginSlice) Less(i, j int) bool

func (*PluginSlice) Swap

func (ps *PluginSlice) Swap(i, j int)

type Port

type Port uint16

Port is a uint16 wrapper type

type Protocol

type Protocol string

Protocol is a string wrapper type

type RemoteLoggingSpec added in v1.1.2

type RemoteLoggingSpec struct {
	// Level defines the remote logging's level.
	Level uint16 `json:"level,omitempty"`
	// Address defines the remote logging's hostname.
	Address string `json:"address,omitempty"`
	// Endpoint defines the API endpoint for remote logging requests sent to the collector.
	Endpoint string `json:"endpoint,omitempty"`
	// Authorization defines the access entity that allows to authorize someone in remote logging service.
	Authorization string `json:"authorization,omitempty"`
	// SampledFraction defines the sampled fraction.
	SampledFraction string `json:"sampledFraction,omitempty"`
}

RemoteLoggingSpec is the type to represent remote logging configuration.

type RetryPolicy

type RetryPolicy struct {
	// RetryOn defines the policies to retry on, delimited by comma.
	RetryOn string `json:"RetryOn"`

	// PerTryTimeout defines the time allowed for a retry before it's considered a failed attempt.
	// +optional
	PerTryTimeout *float64 `json:"PerTryTimeout"`

	// NumRetries defines the max number of retries to attempt.
	// +optional
	NumRetries *uint32 `json:"NumRetries"`

	// RetryBackoffBaseInterval defines the base interval for exponential retry backoff.
	// +optional
	RetryBackoffBaseInterval *float64 `json:"RetryBackoffBaseInterval"`
}

RetryPolicy is the type used to represent the retry policy specified in the Retry policy specification.

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server implements the Aggregate Discovery Services

func NewRepoServer

func NewRepoServer(meshCatalog catalog.MeshCataloger, proxyRegistry *registry.ProxyRegistry, _ bool, fsmNamespace string, cfg configurator.Configurator, certManager *certificate.Manager, kubecontroller k8s.Controller, msgBroker *messaging.Broker) *Server

NewRepoServer creates a new Aggregated Discovery Service server

func (*Server) GetID

func (s *Server) GetID() string

GetID returns the ID of the probe

func (*Server) Liveness

func (s *Server) Liveness() bool

Liveness is the Kubernetes liveness probe handler.

func (*Server) Readiness

func (s *Server) Readiness() bool

Readiness is the Kubernetes readiness probe handler.

func (*Server) Start

func (s *Server) Start(_ uint32, _ *certificate.Certificate) error

Start starts the codebase push server

type ServiceName

type ServiceName string

ServiceName is a string wrapper type

type Services

type Services []ServiceName

Services is a wrapper type of []ServiceName

type SourceIPRange

type SourceIPRange string

SourceIPRange is a string wrapper type

type SourceIPRanges

type SourceIPRanges map[SourceIPRange]*SourceSecuritySpec

SourceIPRanges is a wrapper type of map[SourceIPRange]*SourceSecuritySpec

type SourceSecuritySpec

type SourceSecuritySpec struct {
	MTLS                     bool `json:"mTLS"`
	SkipClientCertValidation bool
	AuthenticatedPrincipals  []string
}

SourceSecuritySpec is the security spec of source

type TCPConnectionSettings

type TCPConnectionSettings struct {
	// MaxConnections specifies the maximum number of TCP connections
	// allowed to the upstream host.
	// Defaults to 4294967295 (2^32 - 1) if not specified.
	// +optional
	MaxConnections *uint32 `json:"MaxConnections,omitempty"`

	// ConnectTimeout specifies the TCP connection timeout.
	// Defaults to 5s if not specified.
	// +optional
	ConnectTimeout *float64 `json:"ConnectTimeout,omitempty"`
}

TCPConnectionSettings defines the TCP connection settings for an upstream host.

type TCPLocalRateLimit

type TCPLocalRateLimit struct {
	// Connections defines the number of connections allowed
	// per unit of time before rate limiting occurs.
	Connections uint32 `json:"Connections"`

	// StatTimeWindow specifies statistical time period of local rate limit
	StatTimeWindow float64 `json:"StatTimeWindow"`

	// Burst defines the number of connections above the baseline
	// rate that are allowed in a short period of time.
	// +optional
	Burst uint32 `json:"Burst,omitempty"`
}

TCPLocalRateLimit defines the local rate limiting specification for the upstream host at the TCP level.

type TCPRateLimit

type TCPRateLimit struct {
	// Local specified the local rate limiting specification
	// for the upstream host.
	// Local rate limiting is enforced directly by the upstream
	// host without any involvement of a global rate limiting service.
	// This is applied as a token bucket rate limiter.
	// +optional
	Local *TCPLocalRateLimit `json:"Local,omitempty"`
}

TCPRateLimit defines the rate limiting specification for the upstream host.

type TracingSpec added in v1.1.2

type TracingSpec struct {
	// Address defines the tracing collectio's hostname.
	Address string `json:"address,omitempty"`

	// Endpoint defines the API endpoint for tracing requests sent to the collector.
	Endpoint string `json:"endpoint,omitempty"`

	// SampledFraction defines the sampled fraction.
	SampledFraction string `json:"sampledFraction,omitempty"`
}

TracingSpec is the type to represent tracing configuration.

type TrafficSpec

type TrafficSpec struct {
	EnableEgress bool

	HTTP1PerRequestLoadBalancing bool
	HTTP2PerRequestLoadBalancing bool
	// contains filtered or unexported fields
}

TrafficSpec represents the spec of traffic

type URIMatchType

type URIMatchType string

URIMatchType is a match type wrapper

const (
	// PathMatchRegex is the type used to specify regex based path matching
	PathMatchRegex URIMatchType = "Regex"

	// PathMatchExact is the type used to specify exact path matching
	PathMatchExact URIMatchType = "Exact"

	// PathMatchPrefix is the type used to specify prefix based path matching
	PathMatchPrefix URIMatchType = "Prefix"
)

type URIPath

type URIPath struct {
	Value URIPathValue
	Type  URIMatchType
}

URIPath is a uri wrapper type

type URIPathValue

type URIPathValue string

URIPathValue is a uri value wrapper

type UpstreamDNSServers

type UpstreamDNSServers struct {
	// Primary defines a primary upstream DNS server for local DNS Proxy.
	Primary *string `json:"Primary,omitempty"`
	// Secondary defines a secondary upstream DNS server for local DNS Proxy.
	Secondary *string `json:"Secondary,omitempty"`
}

UpstreamDNSServers defines upstream DNS servers for local DNS Proxy.

type Weight

type Weight uint32

Weight is a uint32 wrapper type

type WeightedCluster

type WeightedCluster struct {
	service.WeightedCluster
	RetryPolicy *v1alpha1.RetryPolicySpec
}

WeightedCluster is a struct of a cluster and is weight that is backing a service

type WeightedClusters

type WeightedClusters map[ClusterName]Weight

WeightedClusters is a wrapper type of map[ClusterName]Weight

type WeightedEndpoint

type WeightedEndpoint map[HTTPHostPort]Weight

WeightedEndpoint is a wrapper type of map[HTTPHostPort]Weight

type WeightedEndpoints

type WeightedEndpoints map[HTTPHostPort]*WeightedZoneEndpoint

WeightedEndpoints is a wrapper type of map[HTTPHostPort]WeightedZoneEndpoint

type WeightedZoneEndpoint

type WeightedZoneEndpoint struct {
	Weight      Weight `json:"Weight"`
	Cluster     string `json:"Key,omitempty"`
	LBType      string `json:"-"`
	ContextPath string `json:"Path,omitempty"`
	ViaGateway  string `json:"ViaGateway,omitempty"`
}

WeightedZoneEndpoint represents the endpoint with zone and weight

Jump to

Keyboard shortcuts

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