pub struct BaselineClient { /* private fields */ }Expand description
Client for interacting with the baseline service.
Implementations§
Source§impl BaselineClient
impl BaselineClient
Sourcepub fn new(config: ClientConfig) -> Result<Self, ClientError>
pub fn new(config: ClientConfig) -> Result<Self, ClientError>
Creates a new baseline client with the given configuration.
Sourcepub fn with_server_url(
server_url: impl Into<String>,
) -> Result<Self, ClientError>
pub fn with_server_url( server_url: impl Into<String>, ) -> Result<Self, ClientError>
Creates a client with default configuration for the given server URL.
Sourcepub async fn upload_baseline(
&self,
project: &str,
request: &UploadBaselineRequest,
) -> Result<UploadBaselineResponse, ClientError>
pub async fn upload_baseline( &self, project: &str, request: &UploadBaselineRequest, ) -> Result<UploadBaselineResponse, ClientError>
Uploads a new baseline to the server.
§Arguments
project- The project/namespace identifier.request- The upload request containing baseline data.
Sourcepub async fn get_latest_baseline(
&self,
project: &str,
benchmark: &str,
) -> Result<BaselineRecord, ClientError>
pub async fn get_latest_baseline( &self, project: &str, benchmark: &str, ) -> Result<BaselineRecord, ClientError>
Gets the latest baseline for a benchmark.
§Arguments
project- The project/namespace identifier.benchmark- The benchmark name.
Sourcepub async fn get_baseline_version(
&self,
project: &str,
benchmark: &str,
version: &str,
) -> Result<BaselineRecord, ClientError>
pub async fn get_baseline_version( &self, project: &str, benchmark: &str, version: &str, ) -> Result<BaselineRecord, ClientError>
Gets a specific baseline version.
§Arguments
project- The project/namespace identifier.benchmark- The benchmark name.version- The version identifier (string, not u64).
Sourcepub async fn list_baselines(
&self,
project: &str,
query: &ListBaselinesQuery,
) -> Result<ListBaselinesResponse, ClientError>
pub async fn list_baselines( &self, project: &str, query: &ListBaselinesQuery, ) -> Result<ListBaselinesResponse, ClientError>
Lists baselines with optional filtering.
§Arguments
project- The project/namespace identifier.query- Query parameters for filtering and pagination.
Sourcepub async fn delete_baseline(
&self,
project: &str,
benchmark: &str,
version: &str,
) -> Result<(), ClientError>
pub async fn delete_baseline( &self, project: &str, benchmark: &str, version: &str, ) -> Result<(), ClientError>
Deletes a baseline version.
§Arguments
project- The project/namespace identifier.benchmark- The benchmark name.version- The version identifier (string, not u64).
Sourcepub async fn promote_baseline(
&self,
project: &str,
benchmark: &str,
request: &PromoteBaselineRequest,
) -> Result<PromoteBaselineResponse, ClientError>
pub async fn promote_baseline( &self, project: &str, benchmark: &str, request: &PromoteBaselineRequest, ) -> Result<PromoteBaselineResponse, ClientError>
Promotes a baseline version.
§Arguments
project- The project/namespace identifier.benchmark- The benchmark name.request- The promotion request.
Sourcepub async fn health_check(&self) -> Result<HealthResponse, ClientError>
pub async fn health_check(&self) -> Result<HealthResponse, ClientError>
Checks server health.
Sourcepub async fn is_healthy(&self) -> bool
pub async fn is_healthy(&self) -> bool
Returns true if the server is healthy.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for BaselineClient
impl !RefUnwindSafe for BaselineClient
impl Send for BaselineClient
impl Sync for BaselineClient
impl Unpin for BaselineClient
impl UnsafeUnpin for BaselineClient
impl !UnwindSafe for BaselineClient
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