[][src]Function grpcio_sys::grpc_tls_credential_reload_config_create

pub unsafe extern "C" fn grpc_tls_credential_reload_config_create(
    config_user_data: *const c_void,
    schedule: Option<unsafe extern "C" fn(config_user_data: *mut c_void, arg: *mut grpc_tls_credential_reload_arg) -> c_int>,
    cancel: Option<unsafe extern "C" fn(config_user_data: *mut c_void, arg: *mut grpc_tls_credential_reload_arg)>,
    destruct: Option<unsafe extern "C" fn(config_user_data: *mut c_void)>
) -> *mut grpc_tls_credential_reload_config

Create a grpc_tls_credential_reload_config instance.

  • config_user_data is config-specific, read-only user data that works for all channels created with a credential using the config.
  • schedule is a pointer to an application-provided callback used to invoke credential reload API. The implementation of this method has to be non-blocking, but can be performed synchronously or asynchronously.
  1. If processing occurs synchronously, it populates arg->key_materials_config, arg->status, and arg->error_details and returns zero.
  2. If processing occurs asynchronously, it returns a non-zero value. The application then invokes arg->cb when processing is completed. Note that arg->cb cannot be invoked before schedule API returns.
  • cancel is a pointer to an application-provided callback used to cancel a credential reload request scheduled via an asynchronous schedule API. arg is used to pinpoint an exact reloading request to be cancelled. The operation may not have any effect if the request has already been processed.
  • destruct is a pointer to an application-provided callback used to clean up any data associated with the config. It is used for experimental purpose for now and subject to change.