Skip to content

Commit 1a13827

Browse files
authored
*: update grpc c core to 1.41.0 (#549)
Signed-off-by: Jay Lee <[email protected]>
1 parent 0cbd26c commit 1a13827

File tree

7 files changed

+132
-55
lines changed

7 files changed

+132
-55
lines changed

grpc-sys/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "grpcio-sys"
3-
version = "0.9.1+1.38.0"
3+
version = "0.9.1+1.41.0"
44
authors = ["The TiKV Project Developers"]
55
license = "Apache-2.0"
66
keywords = ["grpc", "bindings"]
@@ -70,4 +70,4 @@ pkg-config = "0.3"
7070
walkdir = "2.2.9"
7171
# Because of rust-lang/cargo#5237, bindgen should not be upgraded util a minor or major release.
7272
bindgen = { version = "0.57.0", default-features = false, optional = true, features = ["runtime"] }
73-
boringssl-src = { version = "0.3.0", optional = true }
73+
boringssl-src = { version = "0.4.0", optional = true }

grpc-sys/bindings/aarch64-unknown-linux-gnu-bindings.rs

Lines changed: 62 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,8 @@ pub const GRPC_ARG_WORKAROUND_CRONET_COMPRESSION: &'static [u8; 35usize] =
119119
b"grpc.workaround.cronet_compression\0";
120120
pub const GRPC_ARG_OPTIMIZATION_TARGET: &'static [u8; 25usize] = b"grpc.optimization_target\0";
121121
pub const GRPC_ARG_ENABLE_RETRIES: &'static [u8; 20usize] = b"grpc.enable_retries\0";
122+
pub const GRPC_ARG_EXPERIMENTAL_ENABLE_HEDGING: &'static [u8; 33usize] =
123+
b"grpc.experimental.enable_hedging\0";
122124
pub const GRPC_ARG_PER_RPC_RETRY_BUFFER_SIZE: &'static [u8; 31usize] =
123125
b"grpc.per_rpc_retry_buffer_size\0";
124126
pub const GRPC_ARG_MOBILE_LOG_CONTEXT: &'static [u8; 24usize] = b"grpc.mobile_log_context\0";
@@ -137,6 +139,8 @@ pub const GRPC_ARG_USE_LOCAL_SUBCHANNEL_POOL: &'static [u8; 31usize] =
137139
b"grpc.use_local_subchannel_pool\0";
138140
pub const GRPC_ARG_CHANNEL_POOL_DOMAIN: &'static [u8; 28usize] = b"grpc.channel_pooling_domain\0";
139141
pub const GRPC_ARG_CHANNEL_ID: &'static [u8; 16usize] = b"grpc.channel_id\0";
142+
pub const GRPC_ARG_AUTHORIZATION_POLICY_PROVIDER: &'static [u8; 35usize] =
143+
b"grpc.authorization_policy_provider\0";
140144
pub const GRPC_DEFAULT_MAX_SEND_MESSAGE_LENGTH: i32 = -1;
141145
pub const GRPC_DEFAULT_MAX_RECV_MESSAGE_LENGTH: u32 = 4194304;
142146
pub const GRPC_WRITE_BUFFER_HINT: u32 = 1;
@@ -163,6 +167,7 @@ pub const GRPC_SSL_SESSION_REUSED_PROPERTY: &'static [u8; 19usize] = b"ssl_sessi
163167
pub const GRPC_TRANSPORT_SECURITY_LEVEL_PROPERTY_NAME: &'static [u8; 15usize] = b"security_level\0";
164168
pub const GRPC_PEER_DNS_PROPERTY_NAME: &'static [u8; 9usize] = b"peer_dns\0";
165169
pub const GRPC_PEER_SPIFFE_ID_PROPERTY_NAME: &'static [u8; 15usize] = b"peer_spiffe_id\0";
170+
pub const GRPC_PEER_URI_PROPERTY_NAME: &'static [u8; 9usize] = b"peer_uri\0";
166171
pub const GRPC_PEER_EMAIL_PROPERTY_NAME: &'static [u8; 11usize] = b"peer_email\0";
167172
pub const GRPC_PEER_IP_PROPERTY_NAME: &'static [u8; 8usize] = b"peer_ip\0";
168173
pub const GRPC_DEFAULT_SSL_ROOTS_FILE_PATH_ENV_VAR: &'static [u8; 33usize] =
@@ -846,11 +851,6 @@ pub struct grpc_completion_queue {
846851
}
847852
#[repr(C)]
848853
#[derive(Debug, Copy, Clone)]
849-
pub struct grpc_alarm {
850-
_unused: [u8; 0],
851-
}
852-
#[repr(C)]
853-
#[derive(Debug, Copy, Clone)]
854854
pub struct grpc_channel {
855855
_unused: [u8; 0],
856856
}
@@ -1015,7 +1015,6 @@ pub struct grpc_metadata {
10151015
#[doc = "changing them, update metadata.h at the same time."]
10161016
pub key: grpc_slice,
10171017
pub value: grpc_slice,
1018-
pub flags: u32,
10191018
pub internal_data: grpc_metadata__bindgen_ty_1,
10201019
}
10211020
#[doc = " The following fields are reserved for grpc internal use."]
@@ -1030,8 +1029,8 @@ impl ::std::fmt::Debug for grpc_metadata {
10301029
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
10311030
write!(
10321031
f,
1033-
"grpc_metadata {{ key: {:?}, value: {:?}, flags: {:?}, internal_data: {:?} }}",
1034-
self.key, self.value, self.flags, self.internal_data
1032+
"grpc_metadata {{ key: {:?}, value: {:?}, internal_data: {:?} }}",
1033+
self.key, self.value, self.internal_data
10351034
)
10361035
}
10371036
}
@@ -1300,33 +1299,29 @@ pub enum grpc_cq_completion_type {
13001299
GRPC_CQ_NEXT = 0,
13011300
#[doc = " Events are popped out by calling grpc_completion_queue_pluck() API ONLY"]
13021301
GRPC_CQ_PLUCK = 1,
1303-
#[doc = " EXPERIMENTAL: Events trigger a callback specified as the tag"]
1302+
#[doc = " Events trigger a callback specified as the tag"]
13041303
GRPC_CQ_CALLBACK = 2,
13051304
}
1306-
#[doc = " EXPERIMENTAL: Specifies an interface class to be used as a tag"]
1307-
#[doc = "for callback-based completion queues. This can be used directly,"]
1308-
#[doc = "as the first element of a struct in C, or as a base class in C++."]
1309-
#[doc = "Its \"run\" value should be assigned to some non-member function, such as"]
1310-
#[doc = "a static method."]
1305+
#[doc = " Specifies an interface class to be used as a tag for callback-based"]
1306+
#[doc = " completion queues. This can be used directly, as the first element of a"]
1307+
#[doc = " struct in C, or as a base class in C++. Its \"run\" value should be assigned to"]
1308+
#[doc = " some non-member function, such as a static method."]
13111309
#[repr(C)]
13121310
#[derive(Debug, Copy, Clone)]
1313-
pub struct grpc_experimental_completion_queue_functor {
1311+
pub struct grpc_completion_queue_functor {
13141312
#[doc = " The run member specifies a function that will be called when this"]
13151313
#[doc = "tag is extracted from the completion queue. Its arguments will be a"]
13161314
#[doc = "pointer to this functor and a boolean that indicates whether the"]
13171315
#[doc = "operation succeeded (non-zero) or failed (zero)"]
13181316
pub functor_run: ::std::option::Option<
1319-
unsafe extern "C" fn(
1320-
arg1: *mut grpc_experimental_completion_queue_functor,
1321-
arg2: ::std::os::raw::c_int,
1322-
),
1317+
unsafe extern "C" fn(arg1: *mut grpc_completion_queue_functor, arg2: ::std::os::raw::c_int),
13231318
>,
13241319
#[doc = " The inlineable member specifies whether this functor can be run inline."]
13251320
#[doc = "This should only be used for trivial internally-defined functors."]
13261321
pub inlineable: ::std::os::raw::c_int,
13271322
#[doc = " The following fields are not API. They are meant for internal use."]
13281323
pub internal_success: ::std::os::raw::c_int,
1329-
pub internal_next: *mut grpc_experimental_completion_queue_functor,
1324+
pub internal_next: *mut grpc_completion_queue_functor,
13301325
}
13311326
#[repr(C)]
13321327
#[derive(Debug, Copy, Clone)]
@@ -1339,7 +1334,7 @@ pub struct grpc_completion_queue_attributes {
13391334
pub cq_polling_type: grpc_cq_polling_type,
13401335
#[doc = " When creating a callbackable CQ, pass in a functor to get invoked when"]
13411336
#[doc = " shutdown is complete"]
1342-
pub cq_shutdown_cb: *mut grpc_experimental_completion_queue_functor,
1337+
pub cq_shutdown_cb: *mut grpc_completion_queue_functor,
13431338
}
13441339
#[repr(C)]
13451340
#[derive(Debug, Copy, Clone)]
@@ -1715,7 +1710,7 @@ extern "C" {
17151710
#[doc = "of GRPC_CQ_CALLBACK and grpc_cq_polling_type of GRPC_CQ_DEFAULT_POLLING."]
17161711
#[doc = "This function is experimental."]
17171712
pub fn grpc_completion_queue_create_for_callback(
1718-
shutdown_callback: *mut grpc_experimental_completion_queue_functor,
1713+
shutdown_callback: *mut grpc_completion_queue_functor,
17191714
reserved: *mut ::std::os::raw::c_void,
17201715
) -> *mut grpc_completion_queue;
17211716
}
@@ -2101,13 +2096,18 @@ extern "C" {
21012096
}
21022097
#[repr(C)]
21032098
#[derive(Debug, Copy, Clone)]
2099+
pub struct grpc_serving_status_update {
2100+
pub code: grpc_status_code::Type,
2101+
pub error_message: *const ::std::os::raw::c_char,
2102+
}
2103+
#[repr(C)]
2104+
#[derive(Debug, Copy, Clone)]
21042105
pub struct grpc_server_xds_status_notifier {
21052106
pub on_serving_status_update: ::std::option::Option<
21062107
unsafe extern "C" fn(
21072108
user_data: *mut ::std::os::raw::c_void,
21082109
uri: *const ::std::os::raw::c_char,
2109-
code: grpc_status_code::Type,
2110-
error_message: *const ::std::os::raw::c_char,
2110+
update: grpc_serving_status_update,
21112111
),
21122112
>,
21132113
pub user_data: *mut ::std::os::raw::c_void,
@@ -2277,6 +2277,12 @@ extern "C" {
22772277
extern "C" {
22782278
pub fn grpc_channelz_get_socket(socket_id: isize) -> *mut ::std::os::raw::c_char;
22792279
}
2280+
extern "C" {
2281+
#[doc = " EXPERIMENTAL - Subject to change."]
2282+
#[doc = " Fetch a vtable for grpc_channel_arg that points to"]
2283+
#[doc = " grpc_authorization_policy_provider."]
2284+
pub fn grpc_authorization_policy_provider_arg_vtable() -> *const grpc_arg_pointer_vtable;
2285+
}
22802286
extern "C" {
22812287
pub fn grpc_cronet_secure_channel_create(
22822288
engine: *mut ::std::os::raw::c_void,
@@ -2303,6 +2309,9 @@ extern "C" {
23032309
#[doc = "grpc_server_register_completion_queue API)."]
23042310
#[doc = ""]
23052311
#[doc = "The 'reserved' pointer MUST be NULL."]
2312+
#[doc = ""]
2313+
#[doc = "TODO(hork): add channel_args to this API to allow endpoints and transports"]
2314+
#[doc = "created in this function to participate in the resource quota feature."]
23062315
pub fn grpc_server_add_insecure_channel_from_fd(
23072316
server: *mut grpc_server,
23082317
reserved: *mut ::std::os::raw::c_void,
@@ -3545,6 +3554,35 @@ extern "C" {
35453554
fallback_credentials: *mut grpc_server_credentials,
35463555
) -> *mut grpc_server_credentials;
35473556
}
3557+
#[repr(C)]
3558+
#[derive(Debug, Copy, Clone)]
3559+
pub struct grpc_authorization_policy_provider {
3560+
_unused: [u8; 0],
3561+
}
3562+
extern "C" {
3563+
#[doc = " EXPERIMENTAL - Subject to change."]
3564+
#[doc = " Creates a grpc_authorization_policy_provider using SDK authorization policy"]
3565+
#[doc = " from static string."]
3566+
#[doc = " - authz_policy is the input SDK authorization policy."]
3567+
#[doc = " - code is the error status code on failure. On success, it equals"]
3568+
#[doc = " GRPC_STATUS_OK."]
3569+
#[doc = " - error_details contains details about the error if any. If the"]
3570+
#[doc = " initialization is successful, it will be null. Caller must use gpr_free to"]
3571+
#[doc = " destroy this string."]
3572+
pub fn grpc_authorization_policy_provider_static_data_create(
3573+
authz_policy: *const ::std::os::raw::c_char,
3574+
code: *mut grpc_status_code::Type,
3575+
error_details: *mut *const ::std::os::raw::c_char,
3576+
) -> *mut grpc_authorization_policy_provider;
3577+
}
3578+
extern "C" {
3579+
#[doc = " EXPERIMENTAL - Subject to change."]
3580+
#[doc = " Releases grpc_authorization_policy_provider object. The creator of"]
3581+
#[doc = " grpc_authorization_policy_provider is responsible for its release."]
3582+
pub fn grpc_authorization_policy_provider_release(
3583+
provider: *mut grpc_authorization_policy_provider,
3584+
);
3585+
}
35483586
#[repr(u32)]
35493587
#[doc = " The severity of a log message - use the #defines below when calling into"]
35503588
#[doc = "gpr_log to additionally supply file and line data"]

0 commit comments

Comments
 (0)