compressorv3

package
v1.36.11-2026011520535... Latest Latest
Warning

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

Go to latest
Published: unknown License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const CompressorPerRoute_Disabled_case case_CompressorPerRoute_Override = 1
View Source
const CompressorPerRoute_Override_not_set_case case_CompressorPerRoute_Override = 0
View Source
const CompressorPerRoute_Overrides_case case_CompressorPerRoute_Override = 2

Variables

View Source
var File_envoy_extensions_filters_http_compressor_v3_compressor_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Compressor

type Compressor struct {

	// Minimum response length, in bytes, which will trigger compression. The default value is 30.
	//
	// Deprecated: Marked as deprecated in envoy/extensions/filters/http/compressor/v3/compressor.proto.
	ContentLength *wrapperspb.UInt32Value `protobuf:"bytes,1,opt,name=content_length,json=contentLength,proto3" json:"content_length,omitempty"`
	// Set of strings that allows specifying which mime-types yield compression; e.g.,
	// “application/json“, “text/html“, etc.
	//
	// When this field is not specified, compression will be applied to these following mime-types
	// and their synonyms:
	//
	// * “application/javascript“
	// * “application/json“
	// * “application/xhtml+xml“
	// * “image/svg+xml“
	// * “text/css“
	// * “text/html“
	// * “text/plain“
	// * “text/xml“
	//
	// Deprecated: Marked as deprecated in envoy/extensions/filters/http/compressor/v3/compressor.proto.
	ContentType []string `protobuf:"bytes,2,rep,name=content_type,json=contentType,proto3" json:"content_type,omitempty"`
	// When this field is “true“, disables compression when the response contains an “ETag“ header.
	// When this field is “false“, the filter will preserve weak “ETag“ values and remove those that
	// require strong validation.
	//
	// Deprecated: Marked as deprecated in envoy/extensions/filters/http/compressor/v3/compressor.proto.
	DisableOnEtagHeader bool `protobuf:"varint,3,opt,name=disable_on_etag_header,json=disableOnEtagHeader,proto3" json:"disable_on_etag_header,omitempty"`
	// When this field is “true“, removes “Accept-Encoding“ from the request headers before dispatching
	// the request to the upstream so that responses do not get compressed before reaching the filter.
	//
	// .. attention::
	//
	//	To avoid interfering with other compression filters in the same chain, use this option in
	//	the filter closest to the upstream.
	//
	// Deprecated: Marked as deprecated in envoy/extensions/filters/http/compressor/v3/compressor.proto.
	RemoveAcceptEncodingHeader bool `` /* 144-byte string literal not displayed */
	// Runtime flag that controls whether the filter is enabled. When this field is “false“, the
	// filter will operate as a pass-through filter, unless overridden by “CompressorPerRoute“.
	// If this field is not specified, the filter is enabled by default.
	//
	// Deprecated: Marked as deprecated in envoy/extensions/filters/http/compressor/v3/compressor.proto.
	RuntimeEnabled *v3.RuntimeFeatureFlag `protobuf:"bytes,5,opt,name=runtime_enabled,json=runtimeEnabled,proto3" json:"runtime_enabled,omitempty"`
	// A compressor library to use for compression.
	// [#extension-category: envoy.compression.compressor]
	CompressorLibrary *v3.TypedExtensionConfig `protobuf:"bytes,6,opt,name=compressor_library,json=compressorLibrary,proto3" json:"compressor_library,omitempty"`
	// Configuration for request compression. If this field is not specified, request compression is disabled.
	RequestDirectionConfig *Compressor_RequestDirectionConfig `` /* 129-byte string literal not displayed */
	// Configuration for response compression. If this field is not specified, response compression is enabled.
	//
	// .. attention::
	//
	//	When this field is set, duplicate deprecated fields of the “Compressor“ message,
	//	such as “content_length“, “content_type“, “disable_on_etag_header“,
	//	“remove_accept_encoding_header“, and “runtime_enabled“, are ignored.
	//
	//	Additionally, all statistics related to response compression will be rooted in
	//	“<stat_prefix>.compressor.<compressor_library.name>.<compressor_library_stat_prefix>.response.*“
	//	instead of
	//	“<stat_prefix>.compressor.<compressor_library.name>.<compressor_library_stat_prefix>.*“.
	ResponseDirectionConfig *Compressor_ResponseDirectionConfig `` /* 132-byte string literal not displayed */
	// When this field is “true“, this compressor is preferred when q-values in “Accept-Encoding“ are equal.
	// If multiple compressor filters set “choose_first“ to “true“, the last one in the filter chain is chosen.
	ChooseFirst bool `protobuf:"varint,9,opt,name=choose_first,json=chooseFirst,proto3" json:"choose_first,omitempty"`
	// contains filtered or unexported fields
}

[#next-free-field: 10]

func (*Compressor) ClearCompressorLibrary

func (x *Compressor) ClearCompressorLibrary()

func (*Compressor) ClearContentLength deprecated

func (x *Compressor) ClearContentLength()

Deprecated: Marked as deprecated in envoy/extensions/filters/http/compressor/v3/compressor.proto.

func (*Compressor) ClearRequestDirectionConfig

func (x *Compressor) ClearRequestDirectionConfig()

func (*Compressor) ClearResponseDirectionConfig

func (x *Compressor) ClearResponseDirectionConfig()

func (*Compressor) ClearRuntimeEnabled deprecated

func (x *Compressor) ClearRuntimeEnabled()

Deprecated: Marked as deprecated in envoy/extensions/filters/http/compressor/v3/compressor.proto.

func (*Compressor) GetChooseFirst

func (x *Compressor) GetChooseFirst() bool

func (*Compressor) GetCompressorLibrary

func (x *Compressor) GetCompressorLibrary() *v3.TypedExtensionConfig

func (*Compressor) GetContentLength deprecated

func (x *Compressor) GetContentLength() *wrapperspb.UInt32Value

Deprecated: Marked as deprecated in envoy/extensions/filters/http/compressor/v3/compressor.proto.

func (*Compressor) GetContentType deprecated

func (x *Compressor) GetContentType() []string

Deprecated: Marked as deprecated in envoy/extensions/filters/http/compressor/v3/compressor.proto.

func (*Compressor) GetDisableOnEtagHeader deprecated

func (x *Compressor) GetDisableOnEtagHeader() bool

Deprecated: Marked as deprecated in envoy/extensions/filters/http/compressor/v3/compressor.proto.

func (*Compressor) GetRemoveAcceptEncodingHeader deprecated

func (x *Compressor) GetRemoveAcceptEncodingHeader() bool

Deprecated: Marked as deprecated in envoy/extensions/filters/http/compressor/v3/compressor.proto.

func (*Compressor) GetRequestDirectionConfig

func (x *Compressor) GetRequestDirectionConfig() *Compressor_RequestDirectionConfig

func (*Compressor) GetResponseDirectionConfig

func (x *Compressor) GetResponseDirectionConfig() *Compressor_ResponseDirectionConfig

func (*Compressor) GetRuntimeEnabled deprecated

func (x *Compressor) GetRuntimeEnabled() *v3.RuntimeFeatureFlag

Deprecated: Marked as deprecated in envoy/extensions/filters/http/compressor/v3/compressor.proto.

func (*Compressor) HasCompressorLibrary

func (x *Compressor) HasCompressorLibrary() bool

func (*Compressor) HasContentLength deprecated

func (x *Compressor) HasContentLength() bool

Deprecated: Marked as deprecated in envoy/extensions/filters/http/compressor/v3/compressor.proto.

func (*Compressor) HasRequestDirectionConfig

func (x *Compressor) HasRequestDirectionConfig() bool

func (*Compressor) HasResponseDirectionConfig

func (x *Compressor) HasResponseDirectionConfig() bool

func (*Compressor) HasRuntimeEnabled deprecated

func (x *Compressor) HasRuntimeEnabled() bool

Deprecated: Marked as deprecated in envoy/extensions/filters/http/compressor/v3/compressor.proto.

func (*Compressor) ProtoMessage

func (*Compressor) ProtoMessage()

func (*Compressor) ProtoReflect

func (x *Compressor) ProtoReflect() protoreflect.Message

func (*Compressor) Reset

func (x *Compressor) Reset()

func (*Compressor) SetChooseFirst

func (x *Compressor) SetChooseFirst(v bool)

func (*Compressor) SetCompressorLibrary

func (x *Compressor) SetCompressorLibrary(v *v3.TypedExtensionConfig)

func (*Compressor) SetContentLength deprecated

func (x *Compressor) SetContentLength(v *wrapperspb.UInt32Value)

Deprecated: Marked as deprecated in envoy/extensions/filters/http/compressor/v3/compressor.proto.

func (*Compressor) SetContentType deprecated

func (x *Compressor) SetContentType(v []string)

Deprecated: Marked as deprecated in envoy/extensions/filters/http/compressor/v3/compressor.proto.

func (*Compressor) SetDisableOnEtagHeader deprecated

func (x *Compressor) SetDisableOnEtagHeader(v bool)

Deprecated: Marked as deprecated in envoy/extensions/filters/http/compressor/v3/compressor.proto.

func (*Compressor) SetRemoveAcceptEncodingHeader deprecated

func (x *Compressor) SetRemoveAcceptEncodingHeader(v bool)

Deprecated: Marked as deprecated in envoy/extensions/filters/http/compressor/v3/compressor.proto.

func (*Compressor) SetRequestDirectionConfig

func (x *Compressor) SetRequestDirectionConfig(v *Compressor_RequestDirectionConfig)

func (*Compressor) SetResponseDirectionConfig

func (x *Compressor) SetResponseDirectionConfig(v *Compressor_ResponseDirectionConfig)

func (*Compressor) SetRuntimeEnabled deprecated

func (x *Compressor) SetRuntimeEnabled(v *v3.RuntimeFeatureFlag)

Deprecated: Marked as deprecated in envoy/extensions/filters/http/compressor/v3/compressor.proto.

func (*Compressor) String

func (x *Compressor) String() string

type CompressorOverrides

type CompressorOverrides struct {

	// If present, response compression is enabled.
	ResponseDirectionConfig *ResponseDirectionOverrides `` /* 132-byte string literal not displayed */
	// A compressor library to use for compression. If specified, this overrides
	// the filter-level “compressor_library“ configuration for this route.
	CompressorLibrary *v3.TypedExtensionConfig `protobuf:"bytes,2,opt,name=compressor_library,json=compressorLibrary,proto3" json:"compressor_library,omitempty"`
	// contains filtered or unexported fields
}

Per-route overrides. As per-route overrides are needed, they should be added here, mirroring the structure of “Compressor“. All fields should be optional, to allow overriding arbitrary subsets of configuration.

func (*CompressorOverrides) ClearCompressorLibrary

func (x *CompressorOverrides) ClearCompressorLibrary()

func (*CompressorOverrides) ClearResponseDirectionConfig

func (x *CompressorOverrides) ClearResponseDirectionConfig()

func (*CompressorOverrides) GetCompressorLibrary

func (x *CompressorOverrides) GetCompressorLibrary() *v3.TypedExtensionConfig

func (*CompressorOverrides) GetResponseDirectionConfig

func (x *CompressorOverrides) GetResponseDirectionConfig() *ResponseDirectionOverrides

func (*CompressorOverrides) HasCompressorLibrary

func (x *CompressorOverrides) HasCompressorLibrary() bool

func (*CompressorOverrides) HasResponseDirectionConfig

func (x *CompressorOverrides) HasResponseDirectionConfig() bool

func (*CompressorOverrides) ProtoMessage

func (*CompressorOverrides) ProtoMessage()

func (*CompressorOverrides) ProtoReflect

func (x *CompressorOverrides) ProtoReflect() protoreflect.Message

func (*CompressorOverrides) Reset

func (x *CompressorOverrides) Reset()

func (*CompressorOverrides) SetCompressorLibrary

func (x *CompressorOverrides) SetCompressorLibrary(v *v3.TypedExtensionConfig)

func (*CompressorOverrides) SetResponseDirectionConfig

func (x *CompressorOverrides) SetResponseDirectionConfig(v *ResponseDirectionOverrides)

func (*CompressorOverrides) String

func (x *CompressorOverrides) String() string

type CompressorOverrides_builder

type CompressorOverrides_builder struct {

	// If present, response compression is enabled.
	ResponseDirectionConfig *ResponseDirectionOverrides
	// A compressor library to use for compression. If specified, this overrides
	// the filter-level “compressor_library“ configuration for this route.
	CompressorLibrary *v3.TypedExtensionConfig
	// contains filtered or unexported fields
}

func (CompressorOverrides_builder) Build

type CompressorPerRoute

type CompressorPerRoute struct {

	// Types that are valid to be assigned to Override:
	//
	//	*CompressorPerRoute_Disabled
	//	*CompressorPerRoute_Overrides
	Override isCompressorPerRoute_Override `protobuf_oneof:"override"`
	// contains filtered or unexported fields
}

func (*CompressorPerRoute) ClearDisabled

func (x *CompressorPerRoute) ClearDisabled()

func (*CompressorPerRoute) ClearOverride

func (x *CompressorPerRoute) ClearOverride()

func (*CompressorPerRoute) ClearOverrides

func (x *CompressorPerRoute) ClearOverrides()

func (*CompressorPerRoute) GetDisabled

func (x *CompressorPerRoute) GetDisabled() bool

func (*CompressorPerRoute) GetOverride

func (x *CompressorPerRoute) GetOverride() isCompressorPerRoute_Override

func (*CompressorPerRoute) GetOverrides

func (x *CompressorPerRoute) GetOverrides() *CompressorOverrides

func (*CompressorPerRoute) HasDisabled

func (x *CompressorPerRoute) HasDisabled() bool

func (*CompressorPerRoute) HasOverride

func (x *CompressorPerRoute) HasOverride() bool

func (*CompressorPerRoute) HasOverrides

func (x *CompressorPerRoute) HasOverrides() bool

func (*CompressorPerRoute) ProtoMessage

func (*CompressorPerRoute) ProtoMessage()

func (*CompressorPerRoute) ProtoReflect

func (x *CompressorPerRoute) ProtoReflect() protoreflect.Message

func (*CompressorPerRoute) Reset

func (x *CompressorPerRoute) Reset()

func (*CompressorPerRoute) SetDisabled

func (x *CompressorPerRoute) SetDisabled(v bool)

func (*CompressorPerRoute) SetOverrides

func (x *CompressorPerRoute) SetOverrides(v *CompressorOverrides)

func (*CompressorPerRoute) String

func (x *CompressorPerRoute) String() string

func (*CompressorPerRoute) WhichOverride

func (x *CompressorPerRoute) WhichOverride() case_CompressorPerRoute_Override

type CompressorPerRoute_Disabled

type CompressorPerRoute_Disabled struct {
	// If set, the filter will operate as a pass-through filter.
	// Overrides “Compressor.runtime_enabled“ and “CommonDirectionConfig.enabled“.
	Disabled bool `protobuf:"varint,1,opt,name=disabled,proto3,oneof"`
}

type CompressorPerRoute_Overrides

type CompressorPerRoute_Overrides struct {
	// Per-route overrides. Fields set here will override corresponding fields in “Compressor“.
	Overrides *CompressorOverrides `protobuf:"bytes,2,opt,name=overrides,proto3,oneof"`
}

type CompressorPerRoute_builder

type CompressorPerRoute_builder struct {

	// Fields of oneof Override:
	// If set, the filter will operate as a pass-through filter.
	// Overrides “Compressor.runtime_enabled“ and “CommonDirectionConfig.enabled“.
	Disabled *bool
	// Per-route overrides. Fields set here will override corresponding fields in “Compressor“.
	Overrides *CompressorOverrides
	// contains filtered or unexported fields
}

func (CompressorPerRoute_builder) Build

type Compressor_CommonDirectionConfig

type Compressor_CommonDirectionConfig struct {

	// Runtime flag that controls whether compression is enabled for the direction this
	// common config is applied to. When this field is “false“, the filter will operate as a
	// pass-through filter in the chosen direction, unless overridden by “CompressorPerRoute“.
	// If this field is not specified, the filter will be enabled.
	Enabled *v3.RuntimeFeatureFlag `protobuf:"bytes,1,opt,name=enabled,proto3" json:"enabled,omitempty"`
	// Minimum value of the “Content-Length“ header in request or response messages (depending on the
	// direction this common config is applied to), in bytes, that will trigger compression. Defaults to 30.
	MinContentLength *wrapperspb.UInt32Value `protobuf:"bytes,2,opt,name=min_content_length,json=minContentLength,proto3" json:"min_content_length,omitempty"`
	// Set of strings that allows specifying which mime-types yield compression; e.g.,
	// “application/json“, “text/html“, etc.
	//
	// When this field is not specified, compression will be applied to these following mime-types
	// and their synonyms:
	//
	// * “application/javascript“
	// * “application/json“
	// * “application/xhtml+xml“
	// * “image/svg+xml“
	// * “text/css“
	// * “text/html“
	// * “text/plain“
	// * “text/xml“
	ContentType []string `protobuf:"bytes,3,rep,name=content_type,json=contentType,proto3" json:"content_type,omitempty"`
	// contains filtered or unexported fields
}

func (*Compressor_CommonDirectionConfig) ClearEnabled

func (x *Compressor_CommonDirectionConfig) ClearEnabled()

func (*Compressor_CommonDirectionConfig) ClearMinContentLength

func (x *Compressor_CommonDirectionConfig) ClearMinContentLength()

func (*Compressor_CommonDirectionConfig) GetContentType

func (x *Compressor_CommonDirectionConfig) GetContentType() []string

func (*Compressor_CommonDirectionConfig) GetEnabled

func (*Compressor_CommonDirectionConfig) GetMinContentLength

func (x *Compressor_CommonDirectionConfig) GetMinContentLength() *wrapperspb.UInt32Value

func (*Compressor_CommonDirectionConfig) HasEnabled

func (x *Compressor_CommonDirectionConfig) HasEnabled() bool

func (*Compressor_CommonDirectionConfig) HasMinContentLength

func (x *Compressor_CommonDirectionConfig) HasMinContentLength() bool

func (*Compressor_CommonDirectionConfig) ProtoMessage

func (*Compressor_CommonDirectionConfig) ProtoMessage()

func (*Compressor_CommonDirectionConfig) ProtoReflect

func (*Compressor_CommonDirectionConfig) Reset

func (*Compressor_CommonDirectionConfig) SetContentType

func (x *Compressor_CommonDirectionConfig) SetContentType(v []string)

func (*Compressor_CommonDirectionConfig) SetEnabled

func (*Compressor_CommonDirectionConfig) SetMinContentLength

func (x *Compressor_CommonDirectionConfig) SetMinContentLength(v *wrapperspb.UInt32Value)

func (*Compressor_CommonDirectionConfig) String

type Compressor_CommonDirectionConfig_builder

type Compressor_CommonDirectionConfig_builder struct {

	// Runtime flag that controls whether compression is enabled for the direction this
	// common config is applied to. When this field is “false“, the filter will operate as a
	// pass-through filter in the chosen direction, unless overridden by “CompressorPerRoute“.
	// If this field is not specified, the filter will be enabled.
	Enabled *v3.RuntimeFeatureFlag
	// Minimum value of the “Content-Length“ header in request or response messages (depending on the
	// direction this common config is applied to), in bytes, that will trigger compression. Defaults to 30.
	MinContentLength *wrapperspb.UInt32Value
	// Set of strings that allows specifying which mime-types yield compression; e.g.,
	// “application/json“, “text/html“, etc.
	//
	// When this field is not specified, compression will be applied to these following mime-types
	// and their synonyms:
	//
	// * “application/javascript“
	// * “application/json“
	// * “application/xhtml+xml“
	// * “image/svg+xml“
	// * “text/css“
	// * “text/html“
	// * “text/plain“
	// * “text/xml“
	ContentType []string
	// contains filtered or unexported fields
}

func (Compressor_CommonDirectionConfig_builder) Build

type Compressor_RequestDirectionConfig

type Compressor_RequestDirectionConfig struct {
	CommonConfig *Compressor_CommonDirectionConfig `protobuf:"bytes,1,opt,name=common_config,json=commonConfig,proto3" json:"common_config,omitempty"`
	// contains filtered or unexported fields
}

Configuration for filter behavior on the request direction.

func (*Compressor_RequestDirectionConfig) ClearCommonConfig

func (x *Compressor_RequestDirectionConfig) ClearCommonConfig()

func (*Compressor_RequestDirectionConfig) GetCommonConfig

func (*Compressor_RequestDirectionConfig) HasCommonConfig

func (x *Compressor_RequestDirectionConfig) HasCommonConfig() bool

func (*Compressor_RequestDirectionConfig) ProtoMessage

func (*Compressor_RequestDirectionConfig) ProtoMessage()

func (*Compressor_RequestDirectionConfig) ProtoReflect

func (*Compressor_RequestDirectionConfig) Reset

func (*Compressor_RequestDirectionConfig) SetCommonConfig

func (*Compressor_RequestDirectionConfig) String

type Compressor_RequestDirectionConfig_builder

type Compressor_RequestDirectionConfig_builder struct {
	CommonConfig *Compressor_CommonDirectionConfig
	// contains filtered or unexported fields
}

func (Compressor_RequestDirectionConfig_builder) Build

type Compressor_ResponseDirectionConfig

type Compressor_ResponseDirectionConfig struct {
	CommonConfig *Compressor_CommonDirectionConfig `protobuf:"bytes,1,opt,name=common_config,json=commonConfig,proto3" json:"common_config,omitempty"`
	// When this field is “true“, disables compression when the response contains an “ETag“ header.
	// When this field is “false“, the filter will preserve weak “ETag“ values and remove those that
	// require strong validation.
	DisableOnEtagHeader bool `protobuf:"varint,2,opt,name=disable_on_etag_header,json=disableOnEtagHeader,proto3" json:"disable_on_etag_header,omitempty"`
	// When this field is “true“, removes “Accept-Encoding“ from the request headers before dispatching
	// the request to the upstream so that responses do not get compressed before reaching the filter.
	//
	// .. attention::
	//
	//	To avoid interfering with other compression filters in the same chain, use this option in
	//	the filter closest to the upstream.
	RemoveAcceptEncodingHeader bool `` /* 144-byte string literal not displayed */
	// Set of response codes for which compression is disabled; e.g., 206 Partial Content should not
	// be compressed.
	UncompressibleResponseCodes []uint32 `` /* 152-byte string literal not displayed */
	// If true, the filter adds the “x-envoy-compression-status“ response
	// header to indicate whether the compression occurred and, if not, provide
	// the reason why. The header's value format is
	// “<encoder-type>;<status>[;<additional-params>]“, where “<status>“ is
	// “Compressed“ or the reason compression was skipped (e.g.,
	// “ContentLengthTooSmall“). When this field is enabled, the compressor
	// filter alters the order of the compression eligibility checks to report
	// the most valid reason for skipping the compression.
	StatusHeaderEnabled bool `protobuf:"varint,5,opt,name=status_header_enabled,json=statusHeaderEnabled,proto3" json:"status_header_enabled,omitempty"`
	// contains filtered or unexported fields
}

Configuration for filter behavior on the response direction. [#next-free-field: 6]

func (*Compressor_ResponseDirectionConfig) ClearCommonConfig

func (x *Compressor_ResponseDirectionConfig) ClearCommonConfig()

func (*Compressor_ResponseDirectionConfig) GetCommonConfig

func (*Compressor_ResponseDirectionConfig) GetDisableOnEtagHeader

func (x *Compressor_ResponseDirectionConfig) GetDisableOnEtagHeader() bool

func (*Compressor_ResponseDirectionConfig) GetRemoveAcceptEncodingHeader

func (x *Compressor_ResponseDirectionConfig) GetRemoveAcceptEncodingHeader() bool

func (*Compressor_ResponseDirectionConfig) GetStatusHeaderEnabled

func (x *Compressor_ResponseDirectionConfig) GetStatusHeaderEnabled() bool

func (*Compressor_ResponseDirectionConfig) GetUncompressibleResponseCodes

func (x *Compressor_ResponseDirectionConfig) GetUncompressibleResponseCodes() []uint32

func (*Compressor_ResponseDirectionConfig) HasCommonConfig

func (x *Compressor_ResponseDirectionConfig) HasCommonConfig() bool

func (*Compressor_ResponseDirectionConfig) ProtoMessage

func (*Compressor_ResponseDirectionConfig) ProtoMessage()

func (*Compressor_ResponseDirectionConfig) ProtoReflect

func (*Compressor_ResponseDirectionConfig) Reset

func (*Compressor_ResponseDirectionConfig) SetCommonConfig

func (*Compressor_ResponseDirectionConfig) SetDisableOnEtagHeader

func (x *Compressor_ResponseDirectionConfig) SetDisableOnEtagHeader(v bool)

func (*Compressor_ResponseDirectionConfig) SetRemoveAcceptEncodingHeader

func (x *Compressor_ResponseDirectionConfig) SetRemoveAcceptEncodingHeader(v bool)

func (*Compressor_ResponseDirectionConfig) SetStatusHeaderEnabled

func (x *Compressor_ResponseDirectionConfig) SetStatusHeaderEnabled(v bool)

func (*Compressor_ResponseDirectionConfig) SetUncompressibleResponseCodes

func (x *Compressor_ResponseDirectionConfig) SetUncompressibleResponseCodes(v []uint32)

func (*Compressor_ResponseDirectionConfig) String

type Compressor_ResponseDirectionConfig_builder

type Compressor_ResponseDirectionConfig_builder struct {
	CommonConfig *Compressor_CommonDirectionConfig
	// When this field is “true“, disables compression when the response contains an “ETag“ header.
	// When this field is “false“, the filter will preserve weak “ETag“ values and remove those that
	// require strong validation.
	DisableOnEtagHeader bool
	// When this field is “true“, removes “Accept-Encoding“ from the request headers before dispatching
	// the request to the upstream so that responses do not get compressed before reaching the filter.
	//
	// .. attention::
	//
	//	To avoid interfering with other compression filters in the same chain, use this option in
	//	the filter closest to the upstream.
	RemoveAcceptEncodingHeader bool
	// Set of response codes for which compression is disabled; e.g., 206 Partial Content should not
	// be compressed.
	UncompressibleResponseCodes []uint32
	// If true, the filter adds the “x-envoy-compression-status“ response
	// header to indicate whether the compression occurred and, if not, provide
	// the reason why. The header's value format is
	// “<encoder-type>;<status>[;<additional-params>]“, where “<status>“ is
	// “Compressed“ or the reason compression was skipped (e.g.,
	// “ContentLengthTooSmall“). When this field is enabled, the compressor
	// filter alters the order of the compression eligibility checks to report
	// the most valid reason for skipping the compression.
	StatusHeaderEnabled bool
	// contains filtered or unexported fields
}

func (Compressor_ResponseDirectionConfig_builder) Build

type Compressor_builder

type Compressor_builder struct {

	// Minimum response length, in bytes, which will trigger compression. The default value is 30.
	//
	// Deprecated: Marked as deprecated in envoy/extensions/filters/http/compressor/v3/compressor.proto.
	ContentLength *wrapperspb.UInt32Value
	// Set of strings that allows specifying which mime-types yield compression; e.g.,
	// “application/json“, “text/html“, etc.
	//
	// When this field is not specified, compression will be applied to these following mime-types
	// and their synonyms:
	//
	// * “application/javascript“
	// * “application/json“
	// * “application/xhtml+xml“
	// * “image/svg+xml“
	// * “text/css“
	// * “text/html“
	// * “text/plain“
	// * “text/xml“
	//
	// Deprecated: Marked as deprecated in envoy/extensions/filters/http/compressor/v3/compressor.proto.
	ContentType []string
	// When this field is “true“, disables compression when the response contains an “ETag“ header.
	// When this field is “false“, the filter will preserve weak “ETag“ values and remove those that
	// require strong validation.
	//
	// Deprecated: Marked as deprecated in envoy/extensions/filters/http/compressor/v3/compressor.proto.
	DisableOnEtagHeader bool
	// When this field is “true“, removes “Accept-Encoding“ from the request headers before dispatching
	// the request to the upstream so that responses do not get compressed before reaching the filter.
	//
	// .. attention::
	//
	//	To avoid interfering with other compression filters in the same chain, use this option in
	//	the filter closest to the upstream.
	//
	// Deprecated: Marked as deprecated in envoy/extensions/filters/http/compressor/v3/compressor.proto.
	RemoveAcceptEncodingHeader bool
	// Runtime flag that controls whether the filter is enabled. When this field is “false“, the
	// filter will operate as a pass-through filter, unless overridden by “CompressorPerRoute“.
	// If this field is not specified, the filter is enabled by default.
	//
	// Deprecated: Marked as deprecated in envoy/extensions/filters/http/compressor/v3/compressor.proto.
	RuntimeEnabled *v3.RuntimeFeatureFlag
	// A compressor library to use for compression.
	// [#extension-category: envoy.compression.compressor]
	CompressorLibrary *v3.TypedExtensionConfig
	// Configuration for request compression. If this field is not specified, request compression is disabled.
	RequestDirectionConfig *Compressor_RequestDirectionConfig
	// Configuration for response compression. If this field is not specified, response compression is enabled.
	//
	// .. attention::
	//
	//	When this field is set, duplicate deprecated fields of the “Compressor“ message,
	//	such as “content_length“, “content_type“, “disable_on_etag_header“,
	//	“remove_accept_encoding_header“, and “runtime_enabled“, are ignored.
	//
	//	Additionally, all statistics related to response compression will be rooted in
	//	“<stat_prefix>.compressor.<compressor_library.name>.<compressor_library_stat_prefix>.response.*“
	//	instead of
	//	“<stat_prefix>.compressor.<compressor_library.name>.<compressor_library_stat_prefix>.*“.
	ResponseDirectionConfig *Compressor_ResponseDirectionConfig
	// When this field is “true“, this compressor is preferred when q-values in “Accept-Encoding“ are equal.
	// If multiple compressor filters set “choose_first“ to “true“, the last one in the filter chain is chosen.
	ChooseFirst bool
	// contains filtered or unexported fields
}

func (Compressor_builder) Build

func (b0 Compressor_builder) Build() *Compressor

type ResponseDirectionOverrides

type ResponseDirectionOverrides struct {

	// If set, overrides the filter-level
	// :ref:`remove_accept_encoding_header<envoy_v3_api_field_extensions.filters.http.compressor.v3.Compressor.ResponseDirectionConfig.remove_accept_encoding_header>`.
	RemoveAcceptEncodingHeader *wrapperspb.BoolValue `` /* 143-byte string literal not displayed */
	// contains filtered or unexported fields
}

Per-route overrides of “ResponseDirectionConfig“. Anything added here should be optional, to allow overriding arbitrary subsets of configuration. Omitted fields must have no effect.

func (*ResponseDirectionOverrides) ClearRemoveAcceptEncodingHeader

func (x *ResponseDirectionOverrides) ClearRemoveAcceptEncodingHeader()

func (*ResponseDirectionOverrides) GetRemoveAcceptEncodingHeader

func (x *ResponseDirectionOverrides) GetRemoveAcceptEncodingHeader() *wrapperspb.BoolValue

func (*ResponseDirectionOverrides) HasRemoveAcceptEncodingHeader

func (x *ResponseDirectionOverrides) HasRemoveAcceptEncodingHeader() bool

func (*ResponseDirectionOverrides) ProtoMessage

func (*ResponseDirectionOverrides) ProtoMessage()

func (*ResponseDirectionOverrides) ProtoReflect

func (*ResponseDirectionOverrides) Reset

func (x *ResponseDirectionOverrides) Reset()

func (*ResponseDirectionOverrides) SetRemoveAcceptEncodingHeader

func (x *ResponseDirectionOverrides) SetRemoveAcceptEncodingHeader(v *wrapperspb.BoolValue)

func (*ResponseDirectionOverrides) String

func (x *ResponseDirectionOverrides) String() string

type ResponseDirectionOverrides_builder

type ResponseDirectionOverrides_builder struct {

	// If set, overrides the filter-level
	// :ref:`remove_accept_encoding_header<envoy_v3_api_field_extensions.filters.http.compressor.v3.Compressor.ResponseDirectionConfig.remove_accept_encoding_header>`.
	RemoveAcceptEncodingHeader *wrapperspb.BoolValue
	// contains filtered or unexported fields
}

func (ResponseDirectionOverrides_builder) Build

Source Files

  • compressor.pb.go

Jump to

Keyboard shortcuts

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