pub struct Agent { /* private fields */ }
Expand description
public api Agent can be used to query the Agent endpoints
Implementations§
Source§impl Agent
impl Agent
pub fn new(address: &str) -> Agent
pub fn services(&self) -> ConsulResult<HashMap<String, Service>>
pub fn members(&self) -> ConsulResult<Vec<AgentMember>>
pub fn register(&self, service: RegisterService) -> ConsulResult<()>
pub fn register_ttl_check( &self, health_check: TtlHealthCheck, ) -> ConsulResult<()>
pub fn check_pass(&self, service_id: String) -> ConsulResult<()>
pub fn get_self_name(&self) -> ConsulResult<Option<String>>
pub fn get_self_address(&self) -> ConsulResult<Option<String>>
Auto Trait Implementations§
impl Freeze for Agent
impl !RefUnwindSafe for Agent
impl Send for Agent
impl Sync for Agent
impl Unpin for Agent
impl !UnwindSafe for Agent
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