pub struct PlatformClient { /* private fields */ }Expand description
CLI-based platform client.
Calls tonin subcommands and parses JSON responses. Used by agnitiv-platform to orchestrate deployments without direct dependency on tonin internals.
Implementations§
Source§impl PlatformClient
impl PlatformClient
Sourcepub fn with_config(config: PlatformClientConfig) -> Self
pub fn with_config(config: PlatformClientConfig) -> Self
Create a new platform client with custom config.
Sourcepub fn deploy_service(
&self,
env: &str,
service: &str,
) -> Result<DeployResponse, Box<dyn Error>>
pub fn deploy_service( &self, env: &str, service: &str, ) -> Result<DeployResponse, Box<dyn Error>>
Deploy a service to an environment.
Executes tonin platform deploy --env <ENV> --service <SERVICE> --json
and parses the JSON response.
§Arguments
env— Environment name (e.g. “staging”, “prod”)service— Service name to deploy
§Returns
Ok(DeployResponse)— Deployment resultErr(...)— If command fails or output is not valid JSON
Sourcepub fn get_status(
&self,
env: &str,
) -> Result<Vec<ServiceStatusResponse>, Box<dyn Error>>
pub fn get_status( &self, env: &str, ) -> Result<Vec<ServiceStatusResponse>, Box<dyn Error>>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PlatformClient
impl RefUnwindSafe for PlatformClient
impl Send for PlatformClient
impl Sync for PlatformClient
impl Unpin for PlatformClient
impl UnsafeUnpin for PlatformClient
impl UnwindSafe for PlatformClient
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> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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> 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