Documentation ¶
Index ¶
- Constants
- Variables
- func BuildRateLimitServiceConfig(irListener *ir.HTTPListener) *rlsconfv3.RateLimitConfig
- func GetRateLimitServiceConfigStr(pbCfg *rlsconfv3.RateLimitConfig) (string, error)
- type EndpointType
- type ExtraArgs
- type GlobalRateLimitSettings
- type HTTPRouteTranslator
- type OrderedHTTPFilter
- type OrderedHTTPFilters
- type TCPRouteTranslator
- type Translator
- type UDPRouteTranslator
Constants ¶
View Source
const AuthorityHeaderKey = ":authority"
View Source
const (
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\":\"%START_TIME%\",\"method\":\"%REQ(:METHOD)%\"," + "\"x-envoy-origin-path\":\"%REQ(X-ENVOY-ORIGINAL-PATH?:PATH)%\",\"protocol\":\"%PROTOCOL%\"," + "\"response_code\":\"%RESPONSE_CODE%\",\"response_flags\":\"%RESPONSE_FLAGS%\"," + "\"response_code_details\":\"%RESPONSE_CODE_DETAILS%\"," + "\"connection_termination_details\":\"%CONNECTION_TERMINATION_DETAILS%\"," + "\"upstream_transport_failure_reason\":\"%UPSTREAM_TRANSPORT_FAILURE_REASON%\"," + "\"bytes_received\":\"%BYTES_RECEIVED%\",\"bytes_sent\":\"%BYTES_SENT%\"," + "\"duration\":\"%DURATION%\",\"x-envoy-upstream-service-time\":\"%RESP(X-ENVOY-UPSTREAM-SERVICE-TIME)%\"," + "\"x-forwarded-for\":\"%REQ(X-FORWARDED-FOR)%\",\"user-agent\":\"%REQ(USER-AGENT)%\"," + "\"x-request-id\":\"%REQ(X-REQUEST-ID)%\",\":authority\":\"%REQ(:AUTHORITY)%\"," + "\"upstream_host\":\"%UPSTREAM_HOST%\",\"upstream_cluster\":\"%UPSTREAM_CLUSTER%\"," + "\"upstream_local_address\":\"%UPSTREAM_LOCAL_ADDRESS%\"," + "\"downstream_local_address\":\"%DOWNSTREAM_LOCAL_ADDRESS%\"," + "\"downstream_remote_address\":\"%DOWNSTREAM_REMOTE_ADDRESS%\"," + "\"requested_server_name\":\"%REQUESTED_SERVER_NAME%\",\"route_name\":\"%ROUTE_NAME%\"}\n" )
Variables ¶
View Source
var ( ErrXdsClusterExists = errors.New("xds cluster exists") ErrXdsSecretExists = errors.New("xds secret exists") )
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 ( EndpointTypeDNS EndpointType = iota EndpointTypeStatic )
const ( DefaultEndpointType EndpointType = iota Static EDS )
type ExtraArgs ¶ added in v1.2.0
type ExtraArgs struct {
// contains filtered or unexported fields
}
type GlobalRateLimitSettings ¶ added in v0.3.0
type GlobalRateLimitSettings struct { // ServiceURL is the URL of the global // rate limit service. ServiceURL string // Timeout specifies the timeout period for the proxy to access the ratelimit server // If not set, timeout is 20000000(20ms). Timeout time.Duration // FailClosed is a switch used to control the flow of traffic // when the response from the ratelimit server cannot be obtained. FailClosed bool }
type HTTPRouteTranslator ¶ added in v1.2.0
type OrderedHTTPFilter ¶ added in v0.6.0
type OrderedHTTPFilter struct {
// contains filtered or unexported fields
}
type OrderedHTTPFilters ¶ added in v0.6.0
type OrderedHTTPFilters []*OrderedHTTPFilter
func (OrderedHTTPFilters) Len ¶ added in v0.6.0
func (o OrderedHTTPFilters) Len() int
func (OrderedHTTPFilters) Less ¶ added in v0.6.0
func (o OrderedHTTPFilters) Less(i, j int) bool
func (OrderedHTTPFilters) Swap ¶ added in v0.6.0
func (o OrderedHTTPFilters) Swap(i, j int)
type TCPRouteTranslator ¶ added in v1.2.0
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 // FilterOrder holds the custom order of the HTTP filters FilterOrder []egv1a1.FilterPosition }
Translator translates the xDS IR into xDS resources.
func (*Translator) Translate ¶ added in v0.3.0
func (t *Translator) Translate(xdsIR *ir.Xds) (*types.ResourceVersionTable, error)
Translate translates the XDS IR into xDS resources
type UDPRouteTranslator ¶ added in v1.2.0
Source Files ¶
- accesslog.go
- authorization.go
- basicauth.go
- cluster.go
- cors.go
- custom_response.go
- extauth.go
- extension.go
- extproc.go
- fault.go
- healthcheck.go
- httpfilters.go
- jsonpatch.go
- jwt.go
- listener.go
- local_ratelimit.go
- metadata.go
- oidc.go
- proxy_protocol.go
- ratelimit.go
- route.go
- session_persistence.go
- tcpkeepalive.go
- tracing.go
- translator.go
- utils.go
- wasm.go
Click to show internal directories.
Click to hide internal directories.