@@ -119,6 +119,8 @@ pub const GRPC_ARG_WORKAROUND_CRONET_COMPRESSION: &'static [u8; 35usize] =
119
119
b"grpc.workaround.cronet_compression\0 " ;
120
120
pub const GRPC_ARG_OPTIMIZATION_TARGET : & ' static [ u8 ; 25usize ] = b"grpc.optimization_target\0 " ;
121
121
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 " ;
122
124
pub const GRPC_ARG_PER_RPC_RETRY_BUFFER_SIZE : & ' static [ u8 ; 31usize ] =
123
125
b"grpc.per_rpc_retry_buffer_size\0 " ;
124
126
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] =
137
139
b"grpc.use_local_subchannel_pool\0 " ;
138
140
pub const GRPC_ARG_CHANNEL_POOL_DOMAIN : & ' static [ u8 ; 28usize ] = b"grpc.channel_pooling_domain\0 " ;
139
141
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 " ;
140
144
pub const GRPC_DEFAULT_MAX_SEND_MESSAGE_LENGTH : i32 = -1 ;
141
145
pub const GRPC_DEFAULT_MAX_RECV_MESSAGE_LENGTH : u32 = 4194304 ;
142
146
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
163
167
pub const GRPC_TRANSPORT_SECURITY_LEVEL_PROPERTY_NAME : & ' static [ u8 ; 15usize ] = b"security_level\0 " ;
164
168
pub const GRPC_PEER_DNS_PROPERTY_NAME : & ' static [ u8 ; 9usize ] = b"peer_dns\0 " ;
165
169
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 " ;
166
171
pub const GRPC_PEER_EMAIL_PROPERTY_NAME : & ' static [ u8 ; 11usize ] = b"peer_email\0 " ;
167
172
pub const GRPC_PEER_IP_PROPERTY_NAME : & ' static [ u8 ; 8usize ] = b"peer_ip\0 " ;
168
173
pub const GRPC_DEFAULT_SSL_ROOTS_FILE_PATH_ENV_VAR : & ' static [ u8 ; 33usize ] =
@@ -846,11 +851,6 @@ pub struct grpc_completion_queue {
846
851
}
847
852
#[ repr( C ) ]
848
853
#[ derive( Debug , Copy , Clone ) ]
849
- pub struct grpc_alarm {
850
- _unused : [ u8 ; 0 ] ,
851
- }
852
- #[ repr( C ) ]
853
- #[ derive( Debug , Copy , Clone ) ]
854
854
pub struct grpc_channel {
855
855
_unused : [ u8 ; 0 ] ,
856
856
}
@@ -1015,7 +1015,6 @@ pub struct grpc_metadata {
1015
1015
#[ doc = "changing them, update metadata.h at the same time." ]
1016
1016
pub key : grpc_slice ,
1017
1017
pub value : grpc_slice ,
1018
- pub flags : u32 ,
1019
1018
pub internal_data : grpc_metadata__bindgen_ty_1 ,
1020
1019
}
1021
1020
#[ doc = " The following fields are reserved for grpc internal use." ]
@@ -1030,8 +1029,8 @@ impl ::std::fmt::Debug for grpc_metadata {
1030
1029
fn fmt ( & self , f : & mut :: std:: fmt:: Formatter < ' _ > ) -> :: std:: fmt:: Result {
1031
1030
write ! (
1032
1031
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
1035
1034
)
1036
1035
}
1037
1036
}
@@ -1300,33 +1299,29 @@ pub enum grpc_cq_completion_type {
1300
1299
GRPC_CQ_NEXT = 0 ,
1301
1300
#[ doc = " Events are popped out by calling grpc_completion_queue_pluck() API ONLY" ]
1302
1301
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" ]
1304
1303
GRPC_CQ_CALLBACK = 2 ,
1305
1304
}
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." ]
1311
1309
#[ repr( C ) ]
1312
1310
#[ derive( Debug , Copy , Clone ) ]
1313
- pub struct grpc_experimental_completion_queue_functor {
1311
+ pub struct grpc_completion_queue_functor {
1314
1312
#[ doc = " The run member specifies a function that will be called when this" ]
1315
1313
#[ doc = "tag is extracted from the completion queue. Its arguments will be a" ]
1316
1314
#[ doc = "pointer to this functor and a boolean that indicates whether the" ]
1317
1315
#[ doc = "operation succeeded (non-zero) or failed (zero)" ]
1318
1316
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 ) ,
1323
1318
> ,
1324
1319
#[ doc = " The inlineable member specifies whether this functor can be run inline." ]
1325
1320
#[ doc = "This should only be used for trivial internally-defined functors." ]
1326
1321
pub inlineable : :: std:: os:: raw:: c_int ,
1327
1322
#[ doc = " The following fields are not API. They are meant for internal use." ]
1328
1323
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 ,
1330
1325
}
1331
1326
#[ repr( C ) ]
1332
1327
#[ derive( Debug , Copy , Clone ) ]
@@ -1339,7 +1334,7 @@ pub struct grpc_completion_queue_attributes {
1339
1334
pub cq_polling_type : grpc_cq_polling_type ,
1340
1335
#[ doc = " When creating a callbackable CQ, pass in a functor to get invoked when" ]
1341
1336
#[ 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 ,
1343
1338
}
1344
1339
#[ repr( C ) ]
1345
1340
#[ derive( Debug , Copy , Clone ) ]
@@ -1715,7 +1710,7 @@ extern "C" {
1715
1710
#[ doc = "of GRPC_CQ_CALLBACK and grpc_cq_polling_type of GRPC_CQ_DEFAULT_POLLING." ]
1716
1711
#[ doc = "This function is experimental." ]
1717
1712
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 ,
1719
1714
reserved : * mut :: std:: os:: raw:: c_void ,
1720
1715
) -> * mut grpc_completion_queue ;
1721
1716
}
@@ -2101,13 +2096,18 @@ extern "C" {
2101
2096
}
2102
2097
#[ repr( C ) ]
2103
2098
#[ 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 ) ]
2104
2105
pub struct grpc_server_xds_status_notifier {
2105
2106
pub on_serving_status_update : :: std:: option:: Option <
2106
2107
unsafe extern "C" fn (
2107
2108
user_data : * mut :: std:: os:: raw:: c_void ,
2108
2109
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 ,
2111
2111
) ,
2112
2112
> ,
2113
2113
pub user_data : * mut :: std:: os:: raw:: c_void ,
@@ -2277,6 +2277,12 @@ extern "C" {
2277
2277
extern "C" {
2278
2278
pub fn grpc_channelz_get_socket ( socket_id : isize ) -> * mut :: std:: os:: raw:: c_char ;
2279
2279
}
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
+ }
2280
2286
extern "C" {
2281
2287
pub fn grpc_cronet_secure_channel_create (
2282
2288
engine : * mut :: std:: os:: raw:: c_void ,
@@ -2303,6 +2309,9 @@ extern "C" {
2303
2309
#[ doc = "grpc_server_register_completion_queue API)." ]
2304
2310
#[ doc = "" ]
2305
2311
#[ 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." ]
2306
2315
pub fn grpc_server_add_insecure_channel_from_fd (
2307
2316
server : * mut grpc_server ,
2308
2317
reserved : * mut :: std:: os:: raw:: c_void ,
@@ -3545,6 +3554,35 @@ extern "C" {
3545
3554
fallback_credentials : * mut grpc_server_credentials ,
3546
3555
) -> * mut grpc_server_credentials ;
3547
3556
}
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
+ }
3548
3586
#[ repr( u32 ) ]
3549
3587
#[ doc = " The severity of a log message - use the #defines below when calling into" ]
3550
3588
#[ doc = "gpr_log to additionally supply file and line data" ]
0 commit comments