#include <grpc/support/port_platform.h>
#include "src/core/ext/filters/client_channel/lb_policy/oob_backend_metric.h"
#include <string.h>
#include <algorithm>
#include <set>
#include <string>
#include <utility>
#include <vector>
#include "absl/status/status.h"
#include "absl/strings/string_view.h"
#include "absl/types/optional.h"
#include "google/protobuf/duration.upb.h"
#include "upb/upb.hpp"
#include "xds/service/orca/v3/orca.upb.h"
#include <grpc/impl/connectivity_state.h>
#include <grpc/slice.h>
#include <grpc/status.h>
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include <grpc/support/time.h>
#include "src/core/ext/filters/client_channel/backend_metric.h"
#include "src/core/ext/filters/client_channel/client_channel_channelz.h"
#include "src/core/ext/filters/client_channel/lb_policy/oob_backend_metric_internal.h"
#include "src/core/ext/filters/client_channel/subchannel.h"
#include "src/core/ext/filters/client_channel/subchannel_stream_client.h"
#include "src/core/lib/channel/channel_trace.h"
#include "src/core/lib/debug/trace.h"
#include "src/core/lib/gprpp/debug_location.h"
#include "src/core/lib/gprpp/memory.h"
#include "src/core/lib/gprpp/orphanable.h"
#include "src/core/lib/gprpp/ref_counted_ptr.h"
#include "src/core/lib/gprpp/sync.h"
#include "src/core/lib/gprpp/time.h"
#include "src/core/lib/iomgr/closure.h"
#include "src/core/lib/iomgr/error.h"
#include "src/core/lib/iomgr/exec_ctx.h"
#include "src/core/lib/iomgr/iomgr_fwd.h"
#include "src/core/lib/iomgr/pollset_set.h"
#include "src/core/lib/slice/slice.h"
namespace grpc_core {
TraceFlag grpc_orca_client_trace(false, "orca_client");
class OrcaProducer::ConnectivityWatcher
: public Subchannel::ConnectivityStateWatcherInterface { … };
class OrcaProducer::OrcaStreamEventHandler
: public SubchannelStreamClient::CallEventHandler { … };
void OrcaProducer::Start(RefCountedPtr<Subchannel> subchannel) { … }
void OrcaProducer::Orphan() { … }
void OrcaProducer::AddWatcher(OrcaWatcher* watcher) { … }
void OrcaProducer::RemoveWatcher(OrcaWatcher* watcher) { … }
Duration OrcaProducer::GetMinIntervalLocked() const { … }
void OrcaProducer::MaybeStartStreamLocked() { … }
void OrcaProducer::NotifyWatchers(
const BackendMetricData& backend_metric_data) { … }
void OrcaProducer::OnConnectivityStateChange(grpc_connectivity_state state) { … }
OrcaWatcher::~OrcaWatcher() { … }
void OrcaWatcher::SetSubchannel(Subchannel* subchannel) { … }
std::unique_ptr<SubchannelInterface::DataWatcherInterface>
MakeOobBackendMetricWatcher(Duration report_interval,
std::unique_ptr<OobBackendMetricWatcher> watcher) { … }
}