Documentation
¶
Index ¶
Constants ¶
View Source
const ( AddOperation = "add" EmptyPath = "" )
View Source
const ( // EnvoyTextLogFormat is the default log format for Envoy. // See https://www.envoyproxy.io/docs/envoy/latest/configuration/observability/access_log/usage#default-format-string EnvoyTextLogFormat = "[%START_TIME%] \"%REQ(:METHOD)% %REQ(X-ENVOY-ORIGINAL-PATH?:PATH)% %PROTOCOL%\" " + "%RESPONSE_CODE% %RESPONSE_FLAGS% %BYTES_RECEIVED% %BYTES_SENT% %DURATION% %RESP(X-ENVOY-UPSTREAM-SERVICE-TIME)% " + "\"%REQ(X-FORWARDED-FOR)%\" \"%REQ(USER-AGENT)%\" \"%REQ(X-REQUEST-ID)%\" \"%REQ(:AUTHORITY)%\" \"%UPSTREAM_HOST%\"\n" )
Variables ¶
This section is empty.
Functions ¶
func BuildRateLimitServiceConfig ¶ added in v0.3.0
func BuildRateLimitServiceConfig(irListener *ir.HTTPListener) *rlsconfv3.RateLimitConfig
BuildRateLimitServiceConfig builds the rate limit service configuration based on https://github.com/envoyproxy/ratelimit#the-configuration-format
func GetRateLimitServiceConfigStr ¶ added in v0.3.0
func GetRateLimitServiceConfigStr(pbCfg *rlsconfv3.RateLimitConfig) (string, error)
GetRateLimitServiceConfigStr returns the PB string for the rate limit service configuration.
Types ¶
type EndpointType ¶ added in v0.4.0
type EndpointType int
const ( DefaultEndpointType EndpointType = iota Static EDS )
type GlobalRateLimitSettings ¶ added in v0.3.0
type GlobalRateLimitSettings struct {
// ServiceURL is the URL of the global
// rate limit service.
ServiceURL string
}
type ProtocolType ¶ added in v0.4.0
type ProtocolType int
const ( DefaultProtocol ProtocolType = iota TCP UDP HTTP HTTP2 )
type Translator ¶ added in v0.3.0
type Translator struct {
// GlobalRateLimit holds the global rate limit settings
// required during xds translation.
GlobalRateLimit *GlobalRateLimitSettings
// ExtensionManager holds the config for interacting with extensions when generating xDS
// resources. Only required during xds translation.
ExtensionManager *extensionTypes.Manager
}
Translator translates the xDS IR into xDS resources.
func (*Translator) Translate ¶ added in v0.3.0
func (t *Translator) Translate(ir *ir.Xds) (*types.ResourceVersionTable, error)
Translate translates the XDS IR into xDS resources
Source Files
¶
Click to show internal directories.
Click to hide internal directories.