feat: add streaming state storage

This commit is contained in:
a.tolmachev
2026-04-06 10:23:01 +03:00
parent 6a0381b8e5
commit 7e4f3d142e
7 changed files with 1070 additions and 32 deletions
+8
View File
@@ -142,6 +142,12 @@ impl From<RegistryError> for ApiError {
RegistryError::SecretNotFound { secret_id } => {
Self::not_found(format!("secret {secret_id} was not found"))
}
RegistryError::StreamSessionNotFound { session_id } => {
Self::not_found(format!("stream session {session_id} was not found"))
}
RegistryError::AsyncJobNotFound { job_id } => {
Self::not_found(format!("async job {job_id} was not found"))
}
RegistryError::InvocationLogNotFound { log_id } => {
Self::not_found(format!("invocation log {log_id} was not found"))
}
@@ -177,6 +183,8 @@ impl From<RegistryError> for ApiError {
RegistryError::SecretNameAlreadyExists { workspace_id, name } => Self::conflict(
format!("secret with name {name} already exists in workspace {workspace_id}"),
),
RegistryError::InvalidStreamSessionTransition { .. }
| RegistryError::InvalidAsyncJobTransition { .. } => Self::conflict(value.to_string()),
RegistryError::UserEmailAlreadyExists { email } => {
Self::conflict(format!("user with email {email} already exists"))
}