use super::*;
use async_trait::async_trait;

use crate::executors::ExecutorError;

#[async_trait]
pub trait TenantManager {
    /// Creates or update tenant based on the provided configuration.
    /// This operation should be idempotent; if a tenant with the same `config.id`
    /// already exists and matches the config, it will succeed without changes.
    ///
    /// If it exists but differs, it will be updated, or return an error if the update
    /// action is not supported
    ///
    /// # Arguments
    /// * `config`: The desired configuration for the new tenant.
    async fn provision_tenant(&self, config: &TenantConfig) -> Result<(), ExecutorError>;
}
