Skip to content

Commit bb3e3e9

Browse files
committed
config_dump: Implement streaming version
Signed-off-by: Filip Cacky <filip.cacky@cdn77.com>
1 parent 7e77096 commit bb3e3e9

6 files changed

Lines changed: 777 additions & 218 deletions

File tree

source/server/admin/BUILD

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,8 @@ envoy_cc_library(
367367
"//source/common/common:statusor_lib",
368368
"//source/common/http:codes_lib",
369369
"//source/common/http:header_map_lib",
370+
"//source/common/json:proto_streamer_lib",
371+
"//source/common/protobuf:utility_lib",
370372
"@envoy_api//envoy/admin/v3:pkg_cc_proto",
371373
"@envoy_api//envoy/config/core/v3:pkg_cc_proto",
372374
"@envoy_api//envoy/config/endpoint/v3:pkg_cc_proto",

source/server/admin/admin.cc

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -132,20 +132,7 @@ AdminImpl::AdminImpl(const std::string& profile_path, Server::Instance& server,
132132
MAKE_ADMIN_HANDLER(clusters_handler_.handlerClusters), false, false,
133133
{{Admin::ParamDescriptor::Type::String, "filter",
134134
"Regular expression (Google re2) for filtering clusters by name"}}),
135-
makeHandler(
136-
"/config_dump", "dump current Envoy configs",
137-
MAKE_ADMIN_HANDLER(config_dump_handler_.handlerConfigDump), false, false,
138-
{{Admin::ParamDescriptor::Type::String, "resource", "The resource to dump"},
139-
{Admin::ParamDescriptor::Type::String, "mask",
140-
"The mask to apply. When both resource and mask are specified, "
141-
"the mask is applied to every element in the desired repeated field so that only a "
142-
"subset of fields are returned. The mask is parsed as a Protobuf::FieldMask"},
143-
{Admin::ParamDescriptor::Type::String, "name_regex",
144-
"Dump only the currently loaded configurations whose names match the specified "
145-
"regex. Can be used with both resource and mask query parameters."},
146-
{Admin::ParamDescriptor::Type::Boolean, "include_eds",
147-
"Dump currently loaded configuration including EDS. See the response definition "
148-
"for more information"}}),
135+
config_dump_handler_.handlerConfigDumpStreamed(),
149136
makeHandler("/init_dump", "dump current Envoy init manager information (experimental)",
150137
MAKE_ADMIN_HANDLER(init_dump_handler_.handlerInitDump), false, false,
151138
{{Admin::ParamDescriptor::Type::String, "mask",

0 commit comments

Comments
 (0)