diff --git a/src/api/config.rs b/src/api/config.rs index 6759b8e..da897ed 100644 --- a/src/api/config.rs +++ b/src/api/config.rs @@ -87,7 +87,7 @@ pub trait ConfigService { #[cfg(feature = "async")] #[async_trait::async_trait] -pub trait ConfigService { +pub trait ConfigService: Send + Sync { /// Get config, return the content. /// /// Attention to [`error::Error::ConfigNotFound`], [`error::Error::ConfigQueryConflict`] diff --git a/src/api/naming.rs b/src/api/naming.rs index 702acec..f13ee0d 100644 --- a/src/api/naming.rs +++ b/src/api/naming.rs @@ -217,7 +217,7 @@ pub trait NamingService { #[cfg(feature = "async")] #[async_trait::async_trait] -pub trait NamingService { +pub trait NamingService: Send + Sync { async fn register_instance( &self, service_name: String,