pub struct ConfigServiceBuilder { /* private fields */ }
Expand description
Builder of api ConfigService
.
§Examples
ⓘ
let mut 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()?;
Implementations§
Source§impl ConfigServiceBuilder
impl ConfigServiceBuilder
pub fn new(client_props: ClientProps) -> Self
pub fn enable_auth_plugin_http(self) -> Self
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 fn build(self) -> Result<impl ConfigService>
pub fn build(self) -> Result<impl ConfigService>
Builds a new ConfigService
.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ConfigServiceBuilder
impl !RefUnwindSafe for ConfigServiceBuilder
impl Send for ConfigServiceBuilder
impl Sync for ConfigServiceBuilder
impl Unpin for ConfigServiceBuilder
impl !UnwindSafe 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