Skip to content

Commit af7f9ed

Browse files
committed
chore: update comment
Signed-off-by: shuiyisong <[email protected]>
1 parent ee0e12d commit af7f9ed

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/common/grpc/src/channel_manager.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,9 @@ impl ChannelManager {
9696

9797
/// Create a ChannelManager with configuration and optional TLS config
9898
///
99-
/// Use [`load_reloadable_client_tls_config`] to create TLS configuration from `ClientTlsOption`.
99+
/// Use [`load_client_tls_config`] to create TLS configuration from `ClientTlsOption`.
100100
/// The TLS config supports both static (watch disabled) and dynamic reloading (watch enabled).
101+
/// If you want to use dynamic reloading, please **manually** invoke [`maybe_watch_client_tls_config`] after this method.
101102
pub fn with_config(
102103
config: ChannelConfig,
103104
reloadable_tls_config: Option<Arc<ReloadableClientTlsConfig>>,
@@ -321,7 +322,7 @@ pub struct ReloadableClientTlsConfig {
321322

322323
impl ReloadableClientTlsConfig {
323324
/// Create client config by loading configuration from `ClientTlsOption`
324-
pub fn try_new(tls_option: ClientTlsOption) -> Result<ReloadableClientTlsConfig> {
325+
fn try_new(tls_option: ClientTlsOption) -> Result<ReloadableClientTlsConfig> {
325326
let client_config = load_tls_config(Some(&tls_option))?;
326327
Ok(Self {
327328
tls_option,
@@ -331,7 +332,7 @@ impl ReloadableClientTlsConfig {
331332
}
332333

333334
/// Reread client certificates and keys from file system.
334-
pub fn reload(&self) -> Result<()> {
335+
fn reload(&self) -> Result<()> {
335336
let client_config = load_tls_config(Some(&self.tls_option))?;
336337
*self.config.write().unwrap() = client_config;
337338
self.version.fetch_add(1, Ordering::Relaxed);

0 commit comments

Comments
 (0)