Struct GCHubInternalClient
pub struct GCHubInternalClient {
client: Client,
get_health_url: String,
post_new_runtime_url: String,
}Expand description
Client for the Service Hub internal server.
Fields§
§client: Client§get_health_url: String§post_new_runtime_url: StringImplementations§
§impl GCHubInternalClient
impl GCHubInternalClient
pub fn new(base_url: &str) -> Self
pub fn new(base_url: &str) -> Self
Creates a new client targeting the given base_url.
base_url must be a bare host:port (no scheme, no trailing slash).
pub async fn health(&self) -> Result<(), GCServiceHubError>
pub async fn health(&self) -> Result<(), GCServiceHubError>
Checks the health of the internal server.
pub async fn register_runtime(
&self,
rest_port: u16,
runtime_id: String,
tcp_port: u16,
) -> Result<(), GCServiceHubError>
pub async fn register_runtime( &self, rest_port: u16, runtime_id: String, tcp_port: u16, ) -> Result<(), GCServiceHubError>
Registers a runtime with the Service Hub.
Called once on startup by each runtime to announce itself. The Service Hub
will then open an outbound connection back to the runtime at rest_port.
Trait Implementations§
§impl Clone for GCHubInternalClient
impl Clone for GCHubInternalClient
§fn clone(&self) -> GCHubInternalClient
fn clone(&self) -> GCHubInternalClient
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for GCHubInternalClient
impl !RefUnwindSafe for GCHubInternalClient
impl Send for GCHubInternalClient
impl Sync for GCHubInternalClient
impl Unpin for GCHubInternalClient
impl UnsafeUnpin for GCHubInternalClient
impl !UnwindSafe for GCHubInternalClient
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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 more