pub struct TaskAppClient { /* private fields */ }Expand description
Client for communicating with task apps.
Implementations§
Source§impl TaskAppClient
impl TaskAppClient
Sourcepub fn new(base_url: &str, api_key: Option<&str>) -> TaskAppClient
pub fn new(base_url: &str, api_key: Option<&str>) -> TaskAppClient
Create a new task app client.
Sourcepub fn with_timeout(
base_url: &str,
api_key: Option<&str>,
timeout_secs: u64,
) -> TaskAppClient
pub fn with_timeout( base_url: &str, api_key: Option<&str>, timeout_secs: u64, ) -> TaskAppClient
Create a client with custom timeout.
Sourcepub async fn health(&self) -> Result<HealthResponse, CoreError>
pub async fn health(&self) -> Result<HealthResponse, CoreError>
Check task app health.
Sourcepub async fn is_healthy(&self) -> bool
pub async fn is_healthy(&self) -> bool
Check if the task app is healthy.
Sourcepub async fn info(&self) -> Result<InfoResponse, CoreError>
pub async fn info(&self) -> Result<InfoResponse, CoreError>
Get service info.
Sourcepub async fn task_info(
&self,
seeds: Option<&[i64]>,
) -> Result<Vec<TaskInfo>, CoreError>
pub async fn task_info( &self, seeds: Option<&[i64]>, ) -> Result<Vec<TaskInfo>, CoreError>
Get task info for specific seeds.
Sourcepub async fn taskset_info(&self) -> Result<Value, CoreError>
pub async fn taskset_info(&self) -> Result<Value, CoreError>
Get taskset description (no seeds).
Sourcepub async fn rollout(
&self,
request: &RolloutRequest,
) -> Result<RolloutResponse, CoreError>
pub async fn rollout( &self, request: &RolloutRequest, ) -> Result<RolloutResponse, CoreError>
Execute a rollout.
Sourcepub async fn get(&self, path: &str) -> Result<Value, CoreError>
pub async fn get(&self, path: &str) -> Result<Value, CoreError>
Raw GET request to any endpoint.
Auto Trait Implementations§
impl Freeze for TaskAppClient
impl !RefUnwindSafe for TaskAppClient
impl Send for TaskAppClient
impl Sync for TaskAppClient
impl Unpin for TaskAppClient
impl !UnwindSafe for TaskAppClient
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> 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