pub struct ConfigServiceBuilder { /* private fields */ }Available on crate feature
config only.Expand description
Builder of api ConfigService.
§Examples
let config_service = nacos_sdk::api::config::ConfigServiceBuilder::new(
nacos_sdk::api::props::ClientProps::new()
.server_addr("127.0.0.1:8848")
// Attention! "public" is "", it is recommended to customize the namespace with clear meaning.
.namespace("")
.app_name("todo-your-app-name"),
)
.build()
.await?;Implementations§
Source§impl ConfigServiceBuilder
impl ConfigServiceBuilder
pub fn new(client_props: ClientProps) -> Self
pub fn enable_auth_plugin_http(self) -> Self
Available on crate feature
auth-by-http only.Sourcepub fn with_auth_plugin(self, auth_plugin: Arc<dyn AuthPlugin>) -> Self
pub fn with_auth_plugin(self, auth_plugin: Arc<dyn AuthPlugin>) -> Self
pub fn with_config_filters( self, config_filters: Vec<Box<dyn ConfigFilter>>, ) -> Self
pub fn add_config_filter(self, config_filter: Box<dyn ConfigFilter>) -> Self
Sourcepub fn with_encryption_plugins(
self,
encryption_plugins: Vec<Box<dyn EncryptionPlugin>>,
) -> Self
pub fn with_encryption_plugins( self, encryption_plugins: Vec<Box<dyn EncryptionPlugin>>, ) -> Self
Add plugin::EncryptionPlugin, they will wrapper with plugin::ConfigEncryptionFilter into [config_filters]
Sourcepub async fn build(self) -> Result<ConfigService>
pub async fn build(self) -> Result<ConfigService>
Builds a new ConfigService.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for ConfigServiceBuilder
impl !UnwindSafe for ConfigServiceBuilder
impl Freeze for ConfigServiceBuilder
impl Send for ConfigServiceBuilder
impl Sync for ConfigServiceBuilder
impl Unpin for ConfigServiceBuilder
impl UnsafeUnpin for ConfigServiceBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request