Documentation
¶
Index ¶
- Variables
- type CacheConfig
- func (x *CacheConfig) ClearDisabled()
- func (x *CacheConfig) ClearKeyCreatorParams()
- func (x *CacheConfig) ClearTypedConfig()
- func (x *CacheConfig) GetAllowedVaryHeaders() []*v3.StringMatcher
- func (x *CacheConfig) GetDisabled() *wrapperspb.BoolValue
- func (x *CacheConfig) GetIgnoreRequestCacheControlHeader() bool
- func (x *CacheConfig) GetKeyCreatorParams() *CacheConfig_KeyCreatorParams
- func (x *CacheConfig) GetMaxBodyBytes() uint32
- func (x *CacheConfig) GetTypedConfig() *anypb.Any
- func (x *CacheConfig) HasDisabled() bool
- func (x *CacheConfig) HasKeyCreatorParams() bool
- func (x *CacheConfig) HasTypedConfig() bool
- func (*CacheConfig) ProtoMessage()
- func (x *CacheConfig) ProtoReflect() protoreflect.Message
- func (x *CacheConfig) Reset()
- func (x *CacheConfig) SetAllowedVaryHeaders(v []*v3.StringMatcher)
- func (x *CacheConfig) SetDisabled(v *wrapperspb.BoolValue)
- func (x *CacheConfig) SetIgnoreRequestCacheControlHeader(v bool)
- func (x *CacheConfig) SetKeyCreatorParams(v *CacheConfig_KeyCreatorParams)
- func (x *CacheConfig) SetMaxBodyBytes(v uint32)
- func (x *CacheConfig) SetTypedConfig(v *anypb.Any)
- func (x *CacheConfig) String() string
- type CacheConfig_KeyCreatorParams
- func (x *CacheConfig_KeyCreatorParams) GetExcludeHost() bool
- func (x *CacheConfig_KeyCreatorParams) GetExcludeScheme() bool
- func (x *CacheConfig_KeyCreatorParams) GetQueryParametersExcluded() []*v31.QueryParameterMatcher
- func (x *CacheConfig_KeyCreatorParams) GetQueryParametersIncluded() []*v31.QueryParameterMatcher
- func (*CacheConfig_KeyCreatorParams) ProtoMessage()
- func (x *CacheConfig_KeyCreatorParams) ProtoReflect() protoreflect.Message
- func (x *CacheConfig_KeyCreatorParams) Reset()
- func (x *CacheConfig_KeyCreatorParams) SetExcludeHost(v bool)
- func (x *CacheConfig_KeyCreatorParams) SetExcludeScheme(v bool)
- func (x *CacheConfig_KeyCreatorParams) SetQueryParametersExcluded(v []*v31.QueryParameterMatcher)
- func (x *CacheConfig_KeyCreatorParams) SetQueryParametersIncluded(v []*v31.QueryParameterMatcher)
- func (x *CacheConfig_KeyCreatorParams) String() string
- type CacheConfig_KeyCreatorParams_builder
- type CacheConfig_builder
Constants ¶
This section is empty.
Variables ¶
View Source
var File_envoy_extensions_filters_http_cache_v3_cache_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type CacheConfig ¶
type CacheConfig struct {
// Config specific to the cache storage implementation. Required unless “disabled“
// is true.
// [#extension-category: envoy.http.cache]
TypedConfig *anypb.Any `protobuf:"bytes,1,opt,name=typed_config,json=typedConfig,proto3" json:"typed_config,omitempty"`
// When true, the cache filter is a no-op filter.
//
// Possible use-cases for this include:
// - Turning a filter on and off with :ref:`ECDS <envoy_v3_api_file_envoy/service/extension/v3/config_discovery.proto>`.
// [#comment: once route-specific overrides are implemented, they are the more likely use-case.]
Disabled *wrapperspb.BoolValue `protobuf:"bytes,5,opt,name=disabled,proto3" json:"disabled,omitempty"`
// List of matching rules that defines allowed “Vary“ headers.
//
// The “vary“ response header holds a list of header names that affect the
// contents of a response, as described by
// https://httpwg.org/specs/rfc7234.html#caching.negotiated.responses.
//
// During insertion, “allowed_vary_headers“ acts as a allowlist: if a
// response's “vary“ header mentions any header names that aren't matched by any rules in
// “allowed_vary_headers“, that response will not be cached.
//
// During lookup, “allowed_vary_headers“ controls what request headers will be
// sent to the cache storage implementation.
AllowedVaryHeaders []*v3.StringMatcher `protobuf:"bytes,2,rep,name=allowed_vary_headers,json=allowedVaryHeaders,proto3" json:"allowed_vary_headers,omitempty"`
// [#not-implemented-hide:]
// <TODO(toddmgreer) implement key customization>
//
// Modifies cache key creation by restricting which parts of the URL are included.
KeyCreatorParams *CacheConfig_KeyCreatorParams `protobuf:"bytes,3,opt,name=key_creator_params,json=keyCreatorParams,proto3" json:"key_creator_params,omitempty"`
// [#not-implemented-hide:]
// <TODO(toddmgreer) implement size limit>
//
// Max body size the cache filter will insert into a cache. 0 means unlimited (though the cache
// storage implementation may have its own limit beyond which it will reject insertions).
MaxBodyBytes uint32 `protobuf:"varint,4,opt,name=max_body_bytes,json=maxBodyBytes,proto3" json:"max_body_bytes,omitempty"`
// By default, a “cache-control: no-cache“ or “pragma: no-cache“ header in the request
// causes the cache to validate with its upstream even if the lookup is a hit. Setting this
// to true will ignore these headers.
IgnoreRequestCacheControlHeader bool `` /* 161-byte string literal not displayed */
// contains filtered or unexported fields
}
[#extension: envoy.filters.http.cache] [#next-free-field: 7]
func (*CacheConfig) ClearDisabled ¶
func (x *CacheConfig) ClearDisabled()
func (*CacheConfig) ClearKeyCreatorParams ¶
func (x *CacheConfig) ClearKeyCreatorParams()
func (*CacheConfig) ClearTypedConfig ¶
func (x *CacheConfig) ClearTypedConfig()
func (*CacheConfig) GetAllowedVaryHeaders ¶
func (x *CacheConfig) GetAllowedVaryHeaders() []*v3.StringMatcher
func (*CacheConfig) GetDisabled ¶
func (x *CacheConfig) GetDisabled() *wrapperspb.BoolValue
func (*CacheConfig) GetIgnoreRequestCacheControlHeader ¶
func (x *CacheConfig) GetIgnoreRequestCacheControlHeader() bool
func (*CacheConfig) GetKeyCreatorParams ¶
func (x *CacheConfig) GetKeyCreatorParams() *CacheConfig_KeyCreatorParams
func (*CacheConfig) GetMaxBodyBytes ¶
func (x *CacheConfig) GetMaxBodyBytes() uint32
func (*CacheConfig) GetTypedConfig ¶
func (x *CacheConfig) GetTypedConfig() *anypb.Any
func (*CacheConfig) HasDisabled ¶
func (x *CacheConfig) HasDisabled() bool
func (*CacheConfig) HasKeyCreatorParams ¶
func (x *CacheConfig) HasKeyCreatorParams() bool
func (*CacheConfig) HasTypedConfig ¶
func (x *CacheConfig) HasTypedConfig() bool
func (*CacheConfig) ProtoMessage ¶
func (*CacheConfig) ProtoMessage()
func (*CacheConfig) ProtoReflect ¶
func (x *CacheConfig) ProtoReflect() protoreflect.Message
func (*CacheConfig) Reset ¶
func (x *CacheConfig) Reset()
func (*CacheConfig) SetAllowedVaryHeaders ¶
func (x *CacheConfig) SetAllowedVaryHeaders(v []*v3.StringMatcher)
func (*CacheConfig) SetDisabled ¶
func (x *CacheConfig) SetDisabled(v *wrapperspb.BoolValue)
func (*CacheConfig) SetIgnoreRequestCacheControlHeader ¶
func (x *CacheConfig) SetIgnoreRequestCacheControlHeader(v bool)
func (*CacheConfig) SetKeyCreatorParams ¶
func (x *CacheConfig) SetKeyCreatorParams(v *CacheConfig_KeyCreatorParams)
func (*CacheConfig) SetMaxBodyBytes ¶
func (x *CacheConfig) SetMaxBodyBytes(v uint32)
func (*CacheConfig) SetTypedConfig ¶
func (x *CacheConfig) SetTypedConfig(v *anypb.Any)
func (*CacheConfig) String ¶
func (x *CacheConfig) String() string
type CacheConfig_KeyCreatorParams ¶
type CacheConfig_KeyCreatorParams struct {
// If true, exclude the URL scheme from the cache key. Set to true if your origins always
// produce the same response for http and https requests.
ExcludeScheme bool `protobuf:"varint,1,opt,name=exclude_scheme,json=excludeScheme,proto3" json:"exclude_scheme,omitempty"`
// If true, exclude the host from the cache key. Set to true if your origins' responses don't
// ever depend on host.
ExcludeHost bool `protobuf:"varint,2,opt,name=exclude_host,json=excludeHost,proto3" json:"exclude_host,omitempty"`
// If “query_parameters_included“ is nonempty, only query parameters matched
// by one or more of its matchers are included in the cache key. Any other
// query params will not affect cache lookup.
QueryParametersIncluded []*v31.QueryParameterMatcher `` /* 132-byte string literal not displayed */
// If “query_parameters_excluded“ is nonempty, query parameters matched by one
// or more of its matchers are excluded from the cache key (even if also
// matched by “query_parameters_included“), and will not affect cache lookup.
QueryParametersExcluded []*v31.QueryParameterMatcher `` /* 132-byte string literal not displayed */
// contains filtered or unexported fields
}
[#not-implemented-hide:] Modifies cache key creation by restricting which parts of the URL are included.
func (*CacheConfig_KeyCreatorParams) GetExcludeHost ¶
func (x *CacheConfig_KeyCreatorParams) GetExcludeHost() bool
func (*CacheConfig_KeyCreatorParams) GetExcludeScheme ¶
func (x *CacheConfig_KeyCreatorParams) GetExcludeScheme() bool
func (*CacheConfig_KeyCreatorParams) GetQueryParametersExcluded ¶
func (x *CacheConfig_KeyCreatorParams) GetQueryParametersExcluded() []*v31.QueryParameterMatcher
func (*CacheConfig_KeyCreatorParams) GetQueryParametersIncluded ¶
func (x *CacheConfig_KeyCreatorParams) GetQueryParametersIncluded() []*v31.QueryParameterMatcher
func (*CacheConfig_KeyCreatorParams) ProtoMessage ¶
func (*CacheConfig_KeyCreatorParams) ProtoMessage()
func (*CacheConfig_KeyCreatorParams) ProtoReflect ¶
func (x *CacheConfig_KeyCreatorParams) ProtoReflect() protoreflect.Message
func (*CacheConfig_KeyCreatorParams) Reset ¶
func (x *CacheConfig_KeyCreatorParams) Reset()
func (*CacheConfig_KeyCreatorParams) SetExcludeHost ¶
func (x *CacheConfig_KeyCreatorParams) SetExcludeHost(v bool)
func (*CacheConfig_KeyCreatorParams) SetExcludeScheme ¶
func (x *CacheConfig_KeyCreatorParams) SetExcludeScheme(v bool)
func (*CacheConfig_KeyCreatorParams) SetQueryParametersExcluded ¶
func (x *CacheConfig_KeyCreatorParams) SetQueryParametersExcluded(v []*v31.QueryParameterMatcher)
func (*CacheConfig_KeyCreatorParams) SetQueryParametersIncluded ¶
func (x *CacheConfig_KeyCreatorParams) SetQueryParametersIncluded(v []*v31.QueryParameterMatcher)
func (*CacheConfig_KeyCreatorParams) String ¶
func (x *CacheConfig_KeyCreatorParams) String() string
type CacheConfig_KeyCreatorParams_builder ¶
type CacheConfig_KeyCreatorParams_builder struct {
// If true, exclude the URL scheme from the cache key. Set to true if your origins always
// produce the same response for http and https requests.
ExcludeScheme bool
// If true, exclude the host from the cache key. Set to true if your origins' responses don't
// ever depend on host.
ExcludeHost bool
// If “query_parameters_included“ is nonempty, only query parameters matched
// by one or more of its matchers are included in the cache key. Any other
// query params will not affect cache lookup.
QueryParametersIncluded []*v31.QueryParameterMatcher
// If “query_parameters_excluded“ is nonempty, query parameters matched by one
// or more of its matchers are excluded from the cache key (even if also
// matched by “query_parameters_included“), and will not affect cache lookup.
QueryParametersExcluded []*v31.QueryParameterMatcher
// contains filtered or unexported fields
}
func (CacheConfig_KeyCreatorParams_builder) Build ¶
func (b0 CacheConfig_KeyCreatorParams_builder) Build() *CacheConfig_KeyCreatorParams
type CacheConfig_builder ¶
type CacheConfig_builder struct {
// Config specific to the cache storage implementation. Required unless “disabled“
// is true.
// [#extension-category: envoy.http.cache]
TypedConfig *anypb.Any
// When true, the cache filter is a no-op filter.
//
// Possible use-cases for this include:
// - Turning a filter on and off with :ref:`ECDS <envoy_v3_api_file_envoy/service/extension/v3/config_discovery.proto>`.
// [#comment: once route-specific overrides are implemented, they are the more likely use-case.]
Disabled *wrapperspb.BoolValue
// List of matching rules that defines allowed “Vary“ headers.
//
// The “vary“ response header holds a list of header names that affect the
// contents of a response, as described by
// https://httpwg.org/specs/rfc7234.html#caching.negotiated.responses.
//
// During insertion, “allowed_vary_headers“ acts as a allowlist: if a
// response's “vary“ header mentions any header names that aren't matched by any rules in
// “allowed_vary_headers“, that response will not be cached.
//
// During lookup, “allowed_vary_headers“ controls what request headers will be
// sent to the cache storage implementation.
AllowedVaryHeaders []*v3.StringMatcher
// [#not-implemented-hide:]
// <TODO(toddmgreer) implement key customization>
//
// Modifies cache key creation by restricting which parts of the URL are included.
KeyCreatorParams *CacheConfig_KeyCreatorParams
// [#not-implemented-hide:]
// <TODO(toddmgreer) implement size limit>
//
// Max body size the cache filter will insert into a cache. 0 means unlimited (though the cache
// storage implementation may have its own limit beyond which it will reject insertions).
MaxBodyBytes uint32
// By default, a “cache-control: no-cache“ or “pragma: no-cache“ header in the request
// causes the cache to validate with its upstream even if the lookup is a hit. Setting this
// to true will ignore these headers.
IgnoreRequestCacheControlHeader bool
// contains filtered or unexported fields
}
func (CacheConfig_builder) Build ¶
func (b0 CacheConfig_builder) Build() *CacheConfig
Source Files
¶
- cache.pb.go
Click to show internal directories.
Click to hide internal directories.