Skip to content

Commit

Permalink
replace CompressorLibrary with TypedExtensionConfig
Browse files Browse the repository at this point in the history
Signed-off-by: Dmitry Rozhkov <dmitry.rozhkov@linux.intel.com>
  • Loading branch information
Dmitry Rozhkov committed May 8, 2020
1 parent 8c37ff1 commit 152a6b7
Show file tree
Hide file tree
Showing 13 changed files with 9 additions and 72 deletions.
1 change: 0 additions & 1 deletion api/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,6 @@ proto_library(
"//envoy/extensions/common/dynamic_forward_proxy/v3:pkg",
"//envoy/extensions/common/ratelimit/v3:pkg",
"//envoy/extensions/common/tap/v3:pkg",
"//envoy/extensions/compression/common/compressor/v3:pkg",
"//envoy/extensions/compression/gzip/compressor/v3:pkg",
"//envoy/extensions/filters/common/fault/v3:pkg",
"//envoy/extensions/filters/http/adaptive_concurrency/v3:pkg",
Expand Down
9 changes: 0 additions & 9 deletions api/envoy/extensions/compression/common/compressor/v3/BUILD

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion api/envoy/extensions/filters/http/compressor/v3/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ api_proto_package(
deps = [
"//envoy/config/core/v3:pkg",
"//envoy/config/filter/http/compressor/v2:pkg",
"//envoy/extensions/compression/common/compressor/v3:pkg",
"@com_github_cncf_udpa//udpa/annotations:pkg",
],
)
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ syntax = "proto3";
package envoy.extensions.filters.http.compressor.v3;

import "envoy/config/core/v3/base.proto";
import "envoy/extensions/compression/common/compressor/v3/compressor.proto";
import "envoy/config/core/v3/extension.proto";

import "google/protobuf/any.proto";
import "google/protobuf/wrappers.proto";
Expand Down Expand Up @@ -56,5 +56,5 @@ message Compressor {
// :ref:`envoy.filters.http.compressor.gzip<envoy_api_msg_extensions.compression.gzip.compressor.v3.Gzip>`
// is included in Envoy.
// This field is ignored if used in the context of the gzip http-filter, but is mandatory otherwise.
compression.common.compressor.v3.CompressorLibrary compressor_library = 6;
config.core.v3.TypedExtensionConfig compressor_library = 6;
}
1 change: 0 additions & 1 deletion api/versioning/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ proto_library(
"//envoy/extensions/common/dynamic_forward_proxy/v3:pkg",
"//envoy/extensions/common/ratelimit/v3:pkg",
"//envoy/extensions/common/tap/v3:pkg",
"//envoy/extensions/compression/common/compressor/v3:pkg",
"//envoy/extensions/compression/gzip/compressor/v3:pkg",
"//envoy/extensions/filters/common/fault/v3:pkg",
"//envoy/extensions/filters/http/adaptive_concurrency/v3:pkg",
Expand Down
1 change: 0 additions & 1 deletion docs/root/api-v3/config/compression/compression.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@ Compression
:glob:
:maxdepth: 2

../../extensions/compression/common/*/v3/*
../../extensions/compression/gzip/*/v3/*

This file was deleted.

This file was deleted.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ CompressorFilterConfig::CompressorFilterConfig(
const std::string& stats_prefix, Stats::Scope& scope, Runtime::Loader& runtime,
Compression::Compressor::CompressorFactoryPtr compressor_factory)
: Common::Compressors::CompressorFilterConfig(
generic_compressor, stats_prefix + "compressor." + compressor_factory->statsPrefix(),
generic_compressor,
stats_prefix + "compressor." + generic_compressor.compressor_library().name() + "." +
compressor_factory->statsPrefix(),
scope, runtime, compressor_factory->contentEncoding()),
compressor_factory_(std::move(compressor_factory)) {}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ class CompressorIntegrationTest : public testing::TestWithParam<Network::Address
- text/html
- application/json
compressor_library:
name: testlib
typed_config:
"@type": type.googleapis.com/envoy.extensions.compression.gzip.compressor.v3.Gzip
memory_level: 3
Expand All @@ -88,6 +89,7 @@ class CompressorIntegrationTest : public testing::TestWithParam<Network::Address
typed_config:
"@type": type.googleapis.com/envoy.extensions.filters.http.compressor.v3.Compressor
compressor_library:
name: testlib
typed_config:
"@type": type.googleapis.com/envoy.extensions.compression.gzip.compressor.v3.Gzip
)EOF"};
Expand Down

0 comments on commit 152a6b7

Please sign in to comment.