Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Native source sync at revision @53fa90a
Browse files Browse the repository at this point in the history
dennycd authored Jan 31, 2025
1 parent 53fa90a commit a688caf
Showing 505 changed files with 7,008 additions and 5,289 deletions.
11 changes: 9 additions & 2 deletions gRPC-C++.podspec
Original file line number Diff line number Diff line change
@@ -22,7 +22,7 @@
Pod::Spec.new do |s|
s.name = 'gRPC-C++'
# TODO (mxyan): use version that match gRPC version when pod is stabilized
version = '1.70.0-dev'
version = '1.71.0-dev'
s.version = version
s.summary = 'gRPC C++ library'
s.homepage = 'https://grpc.io'
@@ -267,7 +267,6 @@ Pod::Spec.new do |s|
ss.dependency 'abseil/time/time', abseil_version
ss.dependency 'abseil/types/optional', abseil_version
ss.dependency 'abseil/types/span', abseil_version
ss.dependency 'abseil/types/variant', abseil_version
ss.dependency 'abseil/utility/utility', abseil_version

ss.source_files = 'src/core/call/request_buffer.h',
@@ -538,6 +537,8 @@ Pod::Spec.new do |s|
'src/core/ext/upb-gen/envoy/type/http/v3/cookie.upb_minitable.h',
'src/core/ext/upb-gen/envoy/type/http/v3/path_transformation.upb.h',
'src/core/ext/upb-gen/envoy/type/http/v3/path_transformation.upb_minitable.h',
'src/core/ext/upb-gen/envoy/type/matcher/v3/address.upb.h',
'src/core/ext/upb-gen/envoy/type/matcher/v3/address.upb_minitable.h',
'src/core/ext/upb-gen/envoy/type/matcher/v3/filter_state.upb.h',
'src/core/ext/upb-gen/envoy/type/matcher/v3/filter_state.upb_minitable.h',
'src/core/ext/upb-gen/envoy/type/matcher/v3/http_inputs.upb.h',
@@ -773,6 +774,7 @@ Pod::Spec.new do |s|
'src/core/ext/upbdefs-gen/envoy/service/status/v3/csds.upbdefs.h',
'src/core/ext/upbdefs-gen/envoy/type/http/v3/cookie.upbdefs.h',
'src/core/ext/upbdefs-gen/envoy/type/http/v3/path_transformation.upbdefs.h',
'src/core/ext/upbdefs-gen/envoy/type/matcher/v3/address.upbdefs.h',
'src/core/ext/upbdefs-gen/envoy/type/matcher/v3/filter_state.upbdefs.h',
'src/core/ext/upbdefs-gen/envoy/type/matcher/v3/http_inputs.upbdefs.h',
'src/core/ext/upbdefs-gen/envoy/type/matcher/v3/metadata.upbdefs.h',
@@ -1309,6 +1311,7 @@ Pod::Spec.new do |s|
'src/core/util/useful.h',
'src/core/util/uuid_v4.h',
'src/core/util/validation_errors.h',
'src/core/util/wait_for_single_owner.h',
'src/core/util/work_serializer.h',
'src/core/util/xxhash_inline.h',
'src/core/xds/grpc/certificate_provider_store.h',
@@ -1834,6 +1837,8 @@ Pod::Spec.new do |s|
'src/core/ext/upb-gen/envoy/type/http/v3/cookie.upb_minitable.h',
'src/core/ext/upb-gen/envoy/type/http/v3/path_transformation.upb.h',
'src/core/ext/upb-gen/envoy/type/http/v3/path_transformation.upb_minitable.h',
'src/core/ext/upb-gen/envoy/type/matcher/v3/address.upb.h',
'src/core/ext/upb-gen/envoy/type/matcher/v3/address.upb_minitable.h',
'src/core/ext/upb-gen/envoy/type/matcher/v3/filter_state.upb.h',
'src/core/ext/upb-gen/envoy/type/matcher/v3/filter_state.upb_minitable.h',
'src/core/ext/upb-gen/envoy/type/matcher/v3/http_inputs.upb.h',
@@ -2069,6 +2074,7 @@ Pod::Spec.new do |s|
'src/core/ext/upbdefs-gen/envoy/service/status/v3/csds.upbdefs.h',
'src/core/ext/upbdefs-gen/envoy/type/http/v3/cookie.upbdefs.h',
'src/core/ext/upbdefs-gen/envoy/type/http/v3/path_transformation.upbdefs.h',
'src/core/ext/upbdefs-gen/envoy/type/matcher/v3/address.upbdefs.h',
'src/core/ext/upbdefs-gen/envoy/type/matcher/v3/filter_state.upbdefs.h',
'src/core/ext/upbdefs-gen/envoy/type/matcher/v3/http_inputs.upbdefs.h',
'src/core/ext/upbdefs-gen/envoy/type/matcher/v3/metadata.upbdefs.h',
@@ -2605,6 +2611,7 @@ Pod::Spec.new do |s|
'src/core/util/useful.h',
'src/core/util/uuid_v4.h',
'src/core/util/validation_errors.h',
'src/core/util/wait_for_single_owner.h',
'src/core/util/work_serializer.h',
'src/core/util/xxhash_inline.h',
'src/core/xds/grpc/certificate_provider_store.h',
13 changes: 11 additions & 2 deletions gRPC-Core.podspec
Original file line number Diff line number Diff line change
@@ -21,7 +21,7 @@

Pod::Spec.new do |s|
s.name = 'gRPC-Core'
version = '1.70.0-dev'
version = '1.71.0-dev'
s.version = version
s.summary = 'Core cross-platform gRPC library, written in C'
s.homepage = 'https://grpc.io'
@@ -235,7 +235,6 @@ Pod::Spec.new do |s|
ss.dependency 'abseil/time/time', abseil_version
ss.dependency 'abseil/types/optional', abseil_version
ss.dependency 'abseil/types/span', abseil_version
ss.dependency 'abseil/types/variant', abseil_version
ss.dependency 'abseil/utility/utility', abseil_version
ss.compiler_flags = '-DBORINGSSL_PREFIX=GRPC -Wno-unreachable-code -Wno-shorten-64-to-32'

@@ -679,6 +678,9 @@ Pod::Spec.new do |s|
'src/core/ext/upb-gen/envoy/type/http/v3/path_transformation.upb.h',
'src/core/ext/upb-gen/envoy/type/http/v3/path_transformation.upb_minitable.c',
'src/core/ext/upb-gen/envoy/type/http/v3/path_transformation.upb_minitable.h',
'src/core/ext/upb-gen/envoy/type/matcher/v3/address.upb.h',
'src/core/ext/upb-gen/envoy/type/matcher/v3/address.upb_minitable.c',
'src/core/ext/upb-gen/envoy/type/matcher/v3/address.upb_minitable.h',
'src/core/ext/upb-gen/envoy/type/matcher/v3/filter_state.upb.h',
'src/core/ext/upb-gen/envoy/type/matcher/v3/filter_state.upb_minitable.c',
'src/core/ext/upb-gen/envoy/type/matcher/v3/filter_state.upb_minitable.h',
@@ -1075,6 +1077,8 @@ Pod::Spec.new do |s|
'src/core/ext/upbdefs-gen/envoy/type/http/v3/cookie.upbdefs.h',
'src/core/ext/upbdefs-gen/envoy/type/http/v3/path_transformation.upbdefs.c',
'src/core/ext/upbdefs-gen/envoy/type/http/v3/path_transformation.upbdefs.h',
'src/core/ext/upbdefs-gen/envoy/type/matcher/v3/address.upbdefs.c',
'src/core/ext/upbdefs-gen/envoy/type/matcher/v3/address.upbdefs.h',
'src/core/ext/upbdefs-gen/envoy/type/matcher/v3/filter_state.upbdefs.c',
'src/core/ext/upbdefs-gen/envoy/type/matcher/v3/filter_state.upbdefs.h',
'src/core/ext/upbdefs-gen/envoy/type/matcher/v3/http_inputs.upbdefs.c',
@@ -2092,6 +2096,7 @@ Pod::Spec.new do |s|
'src/core/util/uuid_v4.h',
'src/core/util/validation_errors.cc',
'src/core/util/validation_errors.h',
'src/core/util/wait_for_single_owner.h',
'src/core/util/windows/cpu.cc',
'src/core/util/windows/directory_reader.cc',
'src/core/util/windows/env.cc',
@@ -2689,6 +2694,8 @@ Pod::Spec.new do |s|
'src/core/ext/upb-gen/envoy/type/http/v3/cookie.upb_minitable.h',
'src/core/ext/upb-gen/envoy/type/http/v3/path_transformation.upb.h',
'src/core/ext/upb-gen/envoy/type/http/v3/path_transformation.upb_minitable.h',
'src/core/ext/upb-gen/envoy/type/matcher/v3/address.upb.h',
'src/core/ext/upb-gen/envoy/type/matcher/v3/address.upb_minitable.h',
'src/core/ext/upb-gen/envoy/type/matcher/v3/filter_state.upb.h',
'src/core/ext/upb-gen/envoy/type/matcher/v3/filter_state.upb_minitable.h',
'src/core/ext/upb-gen/envoy/type/matcher/v3/http_inputs.upb.h',
@@ -2924,6 +2931,7 @@ Pod::Spec.new do |s|
'src/core/ext/upbdefs-gen/envoy/service/status/v3/csds.upbdefs.h',
'src/core/ext/upbdefs-gen/envoy/type/http/v3/cookie.upbdefs.h',
'src/core/ext/upbdefs-gen/envoy/type/http/v3/path_transformation.upbdefs.h',
'src/core/ext/upbdefs-gen/envoy/type/matcher/v3/address.upbdefs.h',
'src/core/ext/upbdefs-gen/envoy/type/matcher/v3/filter_state.upbdefs.h',
'src/core/ext/upbdefs-gen/envoy/type/matcher/v3/http_inputs.upbdefs.h',
'src/core/ext/upbdefs-gen/envoy/type/matcher/v3/metadata.upbdefs.h',
@@ -3460,6 +3468,7 @@ Pod::Spec.new do |s|
'src/core/util/useful.h',
'src/core/util/uuid_v4.h',
'src/core/util/validation_errors.h',
'src/core/util/wait_for_single_owner.h',
'src/core/util/work_serializer.h',
'src/core/util/xxhash_inline.h',
'src/core/xds/grpc/certificate_provider_store.h',
2 changes: 1 addition & 1 deletion gRPC-ProtoRPC.podspec
Original file line number Diff line number Diff line change
@@ -21,7 +21,7 @@

Pod::Spec.new do |s|
s.name = 'gRPC-ProtoRPC'
version = '1.70.0-dev'
version = '1.71.0-dev'
s.version = version
s.summary = 'RPC library for Protocol Buffers, based on gRPC'
s.homepage = 'https://grpc.io'
2 changes: 1 addition & 1 deletion gRPC-RxLibrary.podspec
Original file line number Diff line number Diff line change
@@ -21,7 +21,7 @@

Pod::Spec.new do |s|
s.name = 'gRPC-RxLibrary'
version = '1.70.0-dev'
version = '1.71.0-dev'
s.version = version
s.summary = 'Reactive Extensions library for iOS/OSX.'
s.homepage = 'https://grpc.io'
2 changes: 1 addition & 1 deletion gRPC.podspec
Original file line number Diff line number Diff line change
@@ -20,7 +20,7 @@

Pod::Spec.new do |s|
s.name = 'gRPC'
version = '1.70.0-dev'
version = '1.71.0-dev'
s.version = version
s.summary = 'gRPC client library for iOS/OSX'
s.homepage = 'https://grpc.io'
10 changes: 5 additions & 5 deletions include/grpc/event_engine/endpoint_config.h
Original file line number Diff line number Diff line change
@@ -16,10 +16,10 @@

#include <grpc/support/port_platform.h>

#include <optional>
#include <string>

#include "absl/strings/string_view.h"
#include "absl/types/optional.h"

namespace grpc_event_engine {
namespace experimental {
@@ -32,11 +32,11 @@ class EndpointConfig {
public:
virtual ~EndpointConfig() = default;
// If the key points to an integer config, an integer value gets returned.
// Otherwise it returns an absl::nullopt_t
virtual absl::optional<int> GetInt(absl::string_view key) const = 0;
// Otherwise it returns an std::nullopt_t
virtual std::optional<int> GetInt(absl::string_view key) const = 0;
// If the key points to an string config, an string value gets returned.
// Otherwise it returns an absl::nullopt_t
virtual absl::optional<absl::string_view> GetString(
// Otherwise it returns an std::nullopt_t
virtual std::optional<absl::string_view> GetString(
absl::string_view key) const = 0;
// If the key points to an void* config, a void* pointer value gets returned.
// Otherwise it returns nullptr
49 changes: 44 additions & 5 deletions include/grpc/event_engine/event_engine.h
Original file line number Diff line number Diff line change
@@ -28,6 +28,7 @@
#include "absl/status/statusor.h"

// TODO(vigneshbabu): Define the Endpoint::Write metrics collection system
// TODO(hork): remove all references to the factory methods.
namespace grpc_event_engine {
namespace experimental {

@@ -471,7 +472,7 @@ class EventEngine : public std::enable_shared_from_this<EventEngine>,
virtual bool Cancel(TaskHandle handle) = 0;
};

/// Replace gRPC's default EventEngine factory.
/// [DEPRECATED] Replace gRPC's default EventEngine factory.
///
/// Applications may call \a SetEventEngineFactory at any time to replace the
/// default factory used within gRPC. EventEngines will be created when
@@ -480,18 +481,56 @@ class EventEngine : public std::enable_shared_from_this<EventEngine>,
/// To be certain that none of the gRPC-provided built-in EventEngines are
/// created, applications must set a custom EventEngine factory method *before*
/// grpc is initialized.
// TODO(hork): delete once all known users have migrated away
void SetEventEngineFactory(
absl::AnyInvocable<std::unique_ptr<EventEngine>()> factory);
absl::AnyInvocable<std::shared_ptr<EventEngine>()> factory);

/// Reset gRPC's EventEngine factory to the built-in default.
/// [DEPRECATED] Reset gRPC's EventEngine factory to the built-in default.
///
/// Applications that have called \a SetEventEngineFactory can remove their
/// custom factory using this method. The built-in EventEngine factories will be
/// used going forward. This has no affect on any EventEngines that were created
/// using the previous factories.
//
// TODO(hork): delete once all known users have migrated away
void EventEngineFactoryReset();
/// Create an EventEngine using the default factory.
std::unique_ptr<EventEngine> CreateEventEngine();

/// Create a new EventEngine instance.
std::shared_ptr<EventEngine> CreateEventEngine();

/// Set the default EventEngine instance, which will be used throughout gRPC
///
/// gRPC will hold a ref to this engine until either
/// \a ShutdownDefaultEventEngine() is called or \a SetDefaultEventEngine() is
/// called again with a different value. Passing a value of nullptr will cause
/// gRPC to drop the ref it was holding without setting it to a new one.
///
/// Earlier calls to \a GetDefaultEventEngine will still hold a ref to the
/// previous default engine instance, if any.
void SetDefaultEventEngine(std::shared_ptr<EventEngine> engine);

/// Returns the default EventEngine instance.
///
/// Note that if SetDefaultEventEngine() has not been called, then the default
/// EventEngine may be created and destroyed as needed, meaning that multiple
/// calls to GetDefaultEventEngine() over a process's lifetime may return
/// different instances. Callers are expected to call GetDefaultEventEngine()
/// once and hold the returned reference for as long as they need the
/// EventEngine instance.
std::shared_ptr<EventEngine> GetDefaultEventEngine();

/// Resets gRPC to use one of the default internal EventEngines for all *new*
/// \a GetDefaultEventEngine requests and blocks until all refs on the active
/// default engine have been released (destroying that engine).
///
/// If you called \a SetDefaultEventEngine, you must call either
/// \a ShutdownDefaultEventEngine or \a SetDefaultEventEngine(nullptr) at the
/// end of your program. If you don't, the engine will never be destroyed.
///
/// If you want to reset the default engine to one of gRPC's internal versions
/// without waiting for all references to be released on the current default
/// engine, call \a SetDefaultEventEngine(nullptr) instead.
void ShutdownDefaultEventEngine();

bool operator==(const EventEngine::TaskHandle& lhs,
const EventEngine::TaskHandle& rhs);
2 changes: 1 addition & 1 deletion include/grpc/status.h
Original file line number Diff line number Diff line change
@@ -146,7 +146,7 @@ typedef enum {
GRPC_STATUS_DATA_LOSS = 15,

/** Force users to include a default branch: */
GRPC_STATUS__DO_NOT_USE = -1
GRPC_STATUS__DO_NOT_USE = 0x7fffffffu,
} grpc_status_code;

#ifdef __cplusplus
32 changes: 16 additions & 16 deletions include/grpc/support/json.h
Original file line number Diff line number Diff line change
@@ -23,10 +23,10 @@
#include <map>
#include <string>
#include <utility>
#include <variant>
#include <vector>

#include "absl/strings/str_cat.h"
#include "absl/types/variant.h"

namespace grpc_core {
namespace experimental {
@@ -147,46 +147,46 @@ class Json {

// Moveable.
Json(Json&& other) noexcept : value_(std::move(other.value_)) {
other.value_ = absl::monostate();
other.value_ = std::monostate();
}
Json& operator=(Json&& other) noexcept {
value_ = std::move(other.value_);
other.value_ = absl::monostate();
other.value_ = std::monostate();
return *this;
}

// Returns the JSON type.
Type type() const {
struct ValueFunctor {
Json::Type operator()(const absl::monostate&) { return Type::kNull; }
Json::Type operator()(const std::monostate&) { return Type::kNull; }
Json::Type operator()(bool) { return Type::kBoolean; }
Json::Type operator()(const NumberValue&) { return Type::kNumber; }
Json::Type operator()(const std::string&) { return Type::kString; }
Json::Type operator()(const Object&) { return Type::kObject; }
Json::Type operator()(const Array&) { return Type::kArray; }
};
return absl::visit(ValueFunctor(), value_);
return std::visit(ValueFunctor(), value_);
}

// Payload accessor for kBoolean.
// Must not be called for other types.
bool boolean() const { return absl::get<bool>(value_); }
bool boolean() const { return std::get<bool>(value_); }

// Payload accessor for kNumber or kString.
// Must not be called for other types.
const std::string& string() const {
const NumberValue* num = absl::get_if<NumberValue>(&value_);
const NumberValue* num = std::get_if<NumberValue>(&value_);
if (num != nullptr) return num->value;
return absl::get<std::string>(value_);
return std::get<std::string>(value_);
}

// Payload accessor for kObject.
// Must not be called for other types.
const Object& object() const { return absl::get<Object>(value_); }
const Object& object() const { return std::get<Object>(value_); }

// Payload accessor for kArray.
// Must not be called for other types.
const Array& array() const { return absl::get<Array>(value_); }
const Array& array() const { return std::get<Array>(value_); }

bool operator==(const Json& other) const { return value_ == other.value_; }
bool operator!=(const Json& other) const { return !(*this == other); }
@@ -199,12 +199,12 @@ class Json {
return value == other.value;
}
};
using Value = absl::variant<absl::monostate, // kNull
bool, // kBoolean
NumberValue, // kNumber
std::string, // kString
Object, // kObject
Array>; // kArray
using Value = std::variant<std::monostate, // kNull
bool, // kBoolean
NumberValue, // kNumber
std::string, // kString
Object, // kObject
Array>; // kArray

explicit Json(Value value) : value_(std::move(value)) {}

1 change: 0 additions & 1 deletion include/grpcpp/ext/call_metric_recorder.h
Original file line number Diff line number Diff line change
@@ -26,7 +26,6 @@
#include <string>

#include "absl/strings/string_view.h"
#include "absl/types/optional.h"

namespace grpc {
namespace experimental {
8 changes: 4 additions & 4 deletions include/grpcpp/support/server_callback.h
Original file line number Diff line number Diff line change
@@ -477,10 +477,10 @@ class ServerBidiReactor : public internal::ServerReactor {
}

grpc::internal::Mutex stream_mu_;
// TODO(vjpai): Make stream_or_backlog_ into a std::variant or absl::variant
// once C++17 or ABSL is supported since stream and backlog are
// mutually exclusive in this class. Do likewise with the
// remaining reactor classes and their backlogs as well.
// TODO(vjpai): Make stream_or_backlog_ into an std::variant once C++17 or
// ABSL is supported since stream and backlog are mutually exclusive in this
// class. Do likewise with the remaining reactor classes and their backlogs
// as well.
std::atomic<ServerCallbackReaderWriter<Request, Response>*> stream_{nullptr};
struct PreBindBacklog {
bool send_initial_metadata_wanted = false;
4 changes: 2 additions & 2 deletions include/grpcpp/version_info.h
Original file line number Diff line number Diff line change
@@ -19,9 +19,9 @@
#define GRPCPP_VERSION_INFO_H

#define GRPC_CPP_VERSION_MAJOR 1
#define GRPC_CPP_VERSION_MINOR 70
#define GRPC_CPP_VERSION_MINOR 71
#define GRPC_CPP_VERSION_PATCH 0
#define GRPC_CPP_VERSION_TAG "dev"
#define GRPC_CPP_VERSION_STRING "1.70.0-dev"
#define GRPC_CPP_VERSION_STRING "1.71.0-dev"

#endif // GRPCPP_VERSION_INFO_H
Loading

0 comments on commit a688caf

Please sign in to comment.