pub struct MetadataClient { /* private fields */ }Expand description
Client for metadata operations (workflow and task definitions).
Implementations§
Source§impl MetadataClient
impl MetadataClient
Sourcepub async fn register_workflow_def(&self, workflow: &WorkflowDef) -> Result<()>
pub async fn register_workflow_def(&self, workflow: &WorkflowDef) -> Result<()>
Register a new workflow definition.
§Errors
Returns crate::error::ConductorError::Http if the request fails at the transport level, an crate::error::ConductorError::Auth/crate::error::ConductorError::Api/crate::error::ConductorError::Server variant if the server responds with a non-2xx status, or crate::error::ConductorError::Json if the response body can’t be deserialized.
Sourcepub async fn update_workflow_def(&self, workflow: &WorkflowDef) -> Result<()>
pub async fn update_workflow_def(&self, workflow: &WorkflowDef) -> Result<()>
Update an existing workflow definition.
§Errors
Returns crate::error::ConductorError::Http if the request fails at the transport level, an crate::error::ConductorError::Auth/crate::error::ConductorError::Api/crate::error::ConductorError::Server variant if the server responds with a non-2xx status, or crate::error::ConductorError::Json if the response body can’t be deserialized.
Sourcepub async fn register_or_update_workflow_def(
&self,
workflow: &WorkflowDef,
overwrite: bool,
) -> Result<()>
pub async fn register_or_update_workflow_def( &self, workflow: &WorkflowDef, overwrite: bool, ) -> Result<()>
Register or update a workflow definition.
§Errors
Returns crate::error::ConductorError::Http if the request fails at the transport level, an crate::error::ConductorError::Auth/crate::error::ConductorError::Api/crate::error::ConductorError::Server variant if the server responds with a non-2xx status, or crate::error::ConductorError::Json if the response body can’t be deserialized.
Sourcepub async fn get_workflow_def(
&self,
name: &str,
version: Option<i32>,
) -> Result<WorkflowDef>
pub async fn get_workflow_def( &self, name: &str, version: Option<i32>, ) -> Result<WorkflowDef>
Get a workflow definition by name and version.
§Errors
Returns crate::error::ConductorError::Http if the request fails at the transport level, an crate::error::ConductorError::Auth/crate::error::ConductorError::Api/crate::error::ConductorError::Server variant if the server responds with a non-2xx status, or crate::error::ConductorError::Json if the response body can’t be deserialized.
Sourcepub async fn get_all_workflow_def_versions(
&self,
name: &str,
) -> Result<Vec<WorkflowDef>>
pub async fn get_all_workflow_def_versions( &self, name: &str, ) -> Result<Vec<WorkflowDef>>
Get all versions of a workflow definition.
§Errors
Returns crate::error::ConductorError::Http if the request fails at the transport level, an crate::error::ConductorError::Auth/crate::error::ConductorError::Api/crate::error::ConductorError::Server variant if the server responds with a non-2xx status, or crate::error::ConductorError::Json if the response body can’t be deserialized.
Sourcepub async fn get_all_workflow_defs(&self) -> Result<Vec<WorkflowDef>>
pub async fn get_all_workflow_defs(&self) -> Result<Vec<WorkflowDef>>
Get all workflow definitions.
§Errors
Returns crate::error::ConductorError::Http if the request fails at the transport level, an crate::error::ConductorError::Auth/crate::error::ConductorError::Api/crate::error::ConductorError::Server variant if the server responds with a non-2xx status, or crate::error::ConductorError::Json if the response body can’t be deserialized.
Sourcepub async fn get_all_workflow_defs_latest_versions(
&self,
) -> Result<Vec<WorkflowDef>>
pub async fn get_all_workflow_defs_latest_versions( &self, ) -> Result<Vec<WorkflowDef>>
Get all workflow definitions with latest versions (alias for get_all_workflow_defs).
§Errors
Returns crate::error::ConductorError::Http if the request fails at the transport level, or an crate::error::ConductorError::Auth/crate::error::ConductorError::Api/crate::error::ConductorError::Server variant if the server responds with a non-2xx status.
Sourcepub async fn delete_workflow_def(&self, name: &str, version: i32) -> Result<()>
pub async fn delete_workflow_def(&self, name: &str, version: i32) -> Result<()>
Delete a workflow definition.
§Errors
Returns crate::error::ConductorError::Http if the request fails at the transport level, or an crate::error::ConductorError::Auth/crate::error::ConductorError::Api/crate::error::ConductorError::Server variant if the server responds with a non-2xx status.
Sourcepub async fn register_task_def(&self, task: &TaskDef) -> Result<()>
pub async fn register_task_def(&self, task: &TaskDef) -> Result<()>
Register a new task definition.
§Errors
Returns crate::error::ConductorError::Http if the request fails at the transport level, an crate::error::ConductorError::Auth/crate::error::ConductorError::Api/crate::error::ConductorError::Server variant if the server responds with a non-2xx status, or crate::error::ConductorError::Json if the response body can’t be deserialized.
Sourcepub async fn register_task_defs(&self, tasks: &[TaskDef]) -> Result<()>
pub async fn register_task_defs(&self, tasks: &[TaskDef]) -> Result<()>
Register multiple task definitions.
§Errors
Returns crate::error::ConductorError::Http if the request fails at the transport level, an crate::error::ConductorError::Auth/crate::error::ConductorError::Api/crate::error::ConductorError::Server variant if the server responds with a non-2xx status, or crate::error::ConductorError::Json if the response body can’t be deserialized.
Sourcepub async fn update_task_def(&self, task: &TaskDef) -> Result<()>
pub async fn update_task_def(&self, task: &TaskDef) -> Result<()>
Update a task definition.
§Errors
Returns crate::error::ConductorError::Http if the request fails at the transport level, an crate::error::ConductorError::Auth/crate::error::ConductorError::Api/crate::error::ConductorError::Server variant if the server responds with a non-2xx status, or crate::error::ConductorError::Json if the response body can’t be deserialized.
Sourcepub async fn get_task_def(&self, name: &str) -> Result<TaskDef>
pub async fn get_task_def(&self, name: &str) -> Result<TaskDef>
Get a task definition by name.
§Errors
Returns crate::error::ConductorError::Http if the request fails at the transport level, an crate::error::ConductorError::Auth/crate::error::ConductorError::Api/crate::error::ConductorError::Server variant if the server responds with a non-2xx status, or crate::error::ConductorError::Json if the response body can’t be deserialized.
Sourcepub async fn get_all_task_defs(&self) -> Result<Vec<TaskDef>>
pub async fn get_all_task_defs(&self) -> Result<Vec<TaskDef>>
Get all task definitions.
§Errors
Returns crate::error::ConductorError::Http if the request fails at the transport level, or an crate::error::ConductorError::Auth/crate::error::ConductorError::Api/crate::error::ConductorError::Server variant if the server responds with a non-2xx status.
Sourcepub async fn delete_task_def(&self, name: &str) -> Result<()>
pub async fn delete_task_def(&self, name: &str) -> Result<()>
Delete a task definition.
§Errors
Returns crate::error::ConductorError::Http if the request fails at the transport level, or an crate::error::ConductorError::Auth/crate::error::ConductorError::Api/crate::error::ConductorError::Server variant if the server responds with a non-2xx status.
Sourcepub async fn task_def_exists(&self, name: &str) -> Result<bool>
pub async fn task_def_exists(&self, name: &str) -> Result<bool>
Check if a task definition exists.
§Errors
Returns crate::error::ConductorError::Http if the request fails at the transport level, an crate::error::ConductorError::Auth/crate::error::ConductorError::Api/crate::error::ConductorError::Server variant if the server responds with a non-2xx status, or crate::error::ConductorError::Json if the response body can’t be deserialized.
Sourcepub async fn workflow_def_exists(
&self,
name: &str,
version: Option<i32>,
) -> Result<bool>
pub async fn workflow_def_exists( &self, name: &str, version: Option<i32>, ) -> Result<bool>
Check if a workflow definition exists.
§Errors
Returns crate::error::ConductorError::Http if the request fails at the transport level, an crate::error::ConductorError::Auth/crate::error::ConductorError::Api/crate::error::ConductorError::Server variant if the server responds with a non-2xx status, or crate::error::ConductorError::Json if the response body can’t be deserialized.