use super::semiont_session::{OnSessionError, SemiontSession};
use super::signals::SessionSignals;
use super::stored::StoredSession;
use crate::errors::SessionError;
use crate::storage::SessionStorage;
use crate::transport::BoxFuture;
use crate::types::KnowledgeBase;
use std::sync::Arc;
pub struct SessionFactoryOptions {
pub kb: KnowledgeBase,
pub storage: Arc<dyn SessionStorage>,
pub signals: Arc<SessionSignals>,
pub on_error: OnSessionError,
}
pub trait SessionFactory: Send + Sync + 'static {
fn session(&self, options: SessionFactoryOptions) -> Result<SemiontSession, SessionError>;
fn revoke(&self, stored: StoredSession) -> BoxFuture<'static, ()>;
}