From 01acafa412c34637654710c6f3713a09c13107c0 Mon Sep 17 00:00:00 2001 From: htuch Date: Thu, 13 Jul 2017 14:30:12 -0400 Subject: [PATCH] lds: eliminate direction from filter config. (#107) Direction is implied at the C++ type level, putting this in the config is redundant and can making changes to the C++ implementations difficult to synchronize between binary and config. Fixes #63. --- api/filter/http_connection_manager.proto | 15 ++------------- api/lds.proto | 13 ++----------- 2 files changed, 4 insertions(+), 24 deletions(-) diff --git a/api/filter/http_connection_manager.proto b/api/filter/http_connection_manager.proto index dbbdb317..9a7a6b6e 100644 --- a/api/filter/http_connection_manager.proto +++ b/api/filter/http_connection_manager.proto @@ -160,24 +160,13 @@ message AccessLog { } message HttpFilter { - // The type of filter to instantiate. Most filters implement a specific type, - // though it is theoretically possible for a filter to be written such that it - // can operate in multiple modes. Supported types are decoder, encoder, and - // both. - enum Type { - BOTH = 0; - DECODER = 1; - ENCODER = 2; - } - Type type = 1; - // The name of the filter to instantiate. The name must match a supported // filter. - string name = 2; + string name = 1; // Filter specific configuration which depends on the filter being // instantiated. See the supported filters for further documentation. - google.protobuf.Struct config = 3; + google.protobuf.Struct config = 2; } message HttpConnectionManager { diff --git a/api/lds.proto b/api/lds.proto index 3f89107c..9c956af2 100644 --- a/api/lds.proto +++ b/api/lds.proto @@ -33,21 +33,12 @@ service ListenerDiscoveryService { } message Filter { - // The type of filter to instantiate. Most filters implement a specific type, - // though it is theoretically possible for a filter to be written such that it - // can operate in multiple modes. Supported types are read, write, and both. - enum Type { - BOTH = 0; - READ = 1; - WRITE = 2; - } - Type type = 1; // The name of the filter to instantiate. The name must match a supported // filter. - string name = 2; + string name = 1; // Filter specific configuration which depends on the filter being // instantiated. See the supported filters for further documentation. - google.protobuf.Struct config = 3; + google.protobuf.Struct config = 2; } // Specifies the match criteria for selecting a specific filter chain for a