pub struct EurekaClient { /* private fields */ }Implementations§
Source§impl EurekaClient
impl EurekaClient
pub fn new(config: BaseConfig) -> Self
pub fn start(&self)
Sourcepub fn make_request<V: Serialize>(
&self,
app: &str,
path: &str,
method: Method,
body: &V,
headers: HeaderMap,
) -> Result<Response, EurekaError>
pub fn make_request<V: Serialize>( &self, app: &str, path: &str, method: Method, body: &V, headers: HeaderMap, ) -> Result<Response, EurekaError>
Sends a request to another app in this eureka cluster, and returns the response.
This method assumes that your services all communicate using JSON. Future methods may be added to allow other request body types.
Accept: "application/json" is preset on all requests by this method.
You can add additional headers such as Authorization using the headers parameter.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for EurekaClient
impl !RefUnwindSafe for EurekaClient
impl Send for EurekaClient
impl Sync for EurekaClient
impl Unpin for EurekaClient
impl !UnwindSafe for EurekaClient
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> 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