pub struct ServiceRegister;Expand description
Service register for managing Grove’s registration with Mountain
Implementations§
Source§impl ServiceRegister
impl ServiceRegister
Sourcepub async fn register_with_mountain(
service_name: &str,
mountain_address: &str,
auto_reconnect: bool,
) -> Result<ServiceRegistrationResult>
pub async fn register_with_mountain( service_name: &str, mountain_address: &str, auto_reconnect: bool, ) -> Result<ServiceRegistrationResult>
Register Grove with Mountain
Sourcepub async fn unregister_from_mountain(service_id: &str) -> Result<()>
pub async fn unregister_from_mountain(service_id: &str) -> Result<()>
Unregister Grove from Mountain
Sourcepub async fn send_heartbeat(service_id: &str) -> Result<()>
pub async fn send_heartbeat(service_id: &str) -> Result<()>
Heartbeat to keep service alive
Sourcepub async fn update_registration(
service_id: &str,
registration: ServiceRegistration,
) -> Result<ServiceRegistrationResult>
pub async fn update_registration( service_id: &str, registration: ServiceRegistration, ) -> Result<ServiceRegistrationResult>
Update service information
Sourcepub async fn query_service(service_id: &str) -> Result<ServiceRegistration>
pub async fn query_service(service_id: &str) -> Result<ServiceRegistration>
Query service information
Sourcepub async fn list_services() -> Result<Vec<ServiceRegistration>>
pub async fn list_services() -> Result<Vec<ServiceRegistration>>
List all registered services
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ServiceRegister
impl RefUnwindSafe for ServiceRegister
impl Send for ServiceRegister
impl Sync for ServiceRegister
impl Unpin for ServiceRegister
impl UnwindSafe for ServiceRegister
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§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