Skip to content

Commit

Permalink
remove currently non-used failover creation code
Browse files Browse the repository at this point in the history
Signed-off-by: Adi Suissa-Peleg <[email protected]>
  • Loading branch information
adisuissa committed May 31, 2024
1 parent 8f58d5e commit 70410ba
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 39 deletions.
21 changes: 2 additions & 19 deletions source/extensions/config_subscription/grpc/grpc_mux_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -97,25 +97,8 @@ GrpcMuxImpl::createGrpcStreamObject(GrpcMuxContext& grpc_mux_context) {
grpc_mux_context.rate_limit_settings_);
},
/*failover_stream_creator=*/
grpc_mux_context.failover_async_client_
? absl::make_optional(
[&grpc_mux_context](
GrpcStreamCallbacks<envoy::service::discovery::v3::DiscoveryResponse>*
callbacks)
-> GrpcStreamInterfacePtr<envoy::service::discovery::v3::DiscoveryRequest,
envoy::service::discovery::v3::DiscoveryResponse> {
return std::make_unique<
GrpcStream<envoy::service::discovery::v3::DiscoveryRequest,
envoy::service::discovery::v3::DiscoveryResponse>>(
callbacks, std::move(grpc_mux_context.failover_async_client_),
grpc_mux_context.service_method_, grpc_mux_context.dispatcher_,
grpc_mux_context.scope_,
// TODO(adisuissa): the backoff strategy for the failover should
// be the same as the primary source.
std::make_unique<FixedBackOffStrategy>(500),
grpc_mux_context.rate_limit_settings_);
})
: absl::nullopt,
// TODO(adisuissa): implement when failover is fully plumbed.
absl::nullopt,
/*grpc_mux_callbacks=*/*this,
/*dispatch=*/grpc_mux_context.dispatcher_);
}
Expand Down
22 changes: 2 additions & 20 deletions source/extensions/config_subscription/grpc/new_grpc_mux_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -71,26 +71,8 @@ NewGrpcMuxImpl::createGrpcStreamObject(GrpcMuxContext& grpc_mux_context) {
grpc_mux_context.rate_limit_settings_);
},
/*failover_stream_creator=*/
grpc_mux_context.failover_async_client_
? absl::make_optional(
[&grpc_mux_context](
GrpcStreamCallbacks<envoy::service::discovery::v3::DeltaDiscoveryResponse>*
callbacks)
-> GrpcStreamInterfacePtr<
envoy::service::discovery::v3::DeltaDiscoveryRequest,
envoy::service::discovery::v3::DeltaDiscoveryResponse> {
return std::make_unique<
GrpcStream<envoy::service::discovery::v3::DeltaDiscoveryRequest,
envoy::service::discovery::v3::DeltaDiscoveryResponse>>(
callbacks, std::move(grpc_mux_context.failover_async_client_),
grpc_mux_context.service_method_, grpc_mux_context.dispatcher_,
grpc_mux_context.scope_,
// TODO(adisuissa): the backoff strategy for the failover should
// be the same as the primary source.
std::make_unique<FixedBackOffStrategy>(500),
grpc_mux_context.rate_limit_settings_);
})
: absl::nullopt,
// TODO(adisuissa): implement when failover is fully plumbed.
absl::nullopt,
/*grpc_mux_callbacks=*/*this,
/*dispatch=*/grpc_mux_context.dispatcher_);
}
Expand Down

0 comments on commit 70410ba

Please sign in to comment.