Struct nacos_sdk::api::naming::NamingServiceBuilder
source · pub struct NamingServiceBuilder { /* private fields */ }
Expand description
Builder of api NamingService
.
§Examples
ⓘ
let mut naming_service = nacos_sdk::api::naming::NamingServiceBuilder::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 NamingServiceBuilder
impl NamingServiceBuilder
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 build(self) -> Result<impl NamingService>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for NamingServiceBuilder
impl !RefUnwindSafe for NamingServiceBuilder
impl Send for NamingServiceBuilder
impl Sync for NamingServiceBuilder
impl Unpin for NamingServiceBuilder
impl !UnwindSafe for NamingServiceBuilder
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