1
#pragma once
2

            
3
#include "envoy/common/backoff_strategy.h"
4
#include "envoy/config/custom_config_validators.h"
5
#include "envoy/config/eds_resources_cache.h"
6
#include "envoy/config/xds_config_tracker.h"
7
#include "envoy/config/xds_resources_delegate.h"
8
#include "envoy/event/dispatcher.h"
9
#include "envoy/grpc/async_client.h"
10
#include "envoy/local_info/local_info.h"
11
#include "envoy/stats/scope.h"
12

            
13
#include "source/common/config/utility.h"
14

            
15
namespace Envoy {
16
namespace Config {
17

            
18
// Context (data) needed for creating any GrpcMux object.
19
struct GrpcMuxContext {
20
  Grpc::RawAsyncClientSharedPtr async_client_;
21
  Grpc::RawAsyncClientSharedPtr failover_async_client_;
22
  Event::Dispatcher& dispatcher_;
23
  const Protobuf::MethodDescriptor& service_method_;
24
  const LocalInfo::LocalInfo& local_info_;
25
  const RateLimitSettings& rate_limit_settings_;
26
  Stats::Scope& scope_;
27
  CustomConfigValidatorsPtr config_validators_;
28
  XdsResourcesDelegateOptRef xds_resources_delegate_;
29
  XdsConfigTrackerOptRef xds_config_tracker_;
30
  BackOffStrategyPtr backoff_strategy_;
31
  const std::string& target_xds_authority_;
32
  EdsResourcesCachePtr eds_resources_cache_;
33
  bool skip_subsequent_node_;
34
  // A factory method that allows a GrpcMux lazily create a Load-Stats-Reporter
35
  // if needed.
36
  std::function<std::unique_ptr<Upstream::LoadStatsReporter>()> load_stats_reporter_factory_;
37
};
38

            
39
} // namespace Config
40
} // namespace Envoy