a2a_protocol_server/store/
mod.rs1pub mod task_store;
9pub mod tenant;
10
11#[cfg(any(feature = "sqlite", feature = "postgres"))]
13pub(crate) mod cursor;
14
15pub(crate) mod pagination;
17
18#[cfg(feature = "sqlite")]
19pub mod migration;
20#[cfg(feature = "sqlite")]
21pub mod sqlite_store;
22#[cfg(feature = "sqlite")]
23pub mod tenant_sqlite_store;
24
25#[cfg(feature = "postgres")]
26pub mod pg_migration;
27#[cfg(feature = "postgres")]
28pub mod postgres_store;
29#[cfg(feature = "postgres")]
30pub mod tenant_postgres_store;
31
32pub use task_store::{InMemoryTaskStore, TaskStore, TaskStoreConfig};
33pub use tenant::{TenantAwareInMemoryTaskStore, TenantContext, TenantStoreConfig};
34
35#[cfg(feature = "sqlite")]
48pub(crate) fn status_timestamp_sqlite(ts: Option<&str>) -> Option<String> {
49 let millis = ts.and_then(a2a_protocol_types::parse_iso8601_to_unix_millis)?;
50 let iso = a2a_protocol_types::unix_millis_to_iso8601(millis);
51 Some(format!("{} {}", &iso[..10], &iso[11..23]))
53}
54
55#[cfg(feature = "postgres")]
60pub(crate) fn status_timestamp_rfc3339(ts: Option<&str>) -> Option<String> {
61 let millis = ts.and_then(a2a_protocol_types::parse_iso8601_to_unix_millis)?;
62 Some(a2a_protocol_types::unix_millis_to_iso8601(millis))
63}
64
65#[cfg(feature = "sqlite")]
66pub use migration::{Migration, MigrationRunner};
67#[cfg(feature = "sqlite")]
68pub use sqlite_store::SqliteTaskStore;
69#[cfg(feature = "sqlite")]
70pub use tenant_sqlite_store::TenantAwareSqliteTaskStore;
71
72#[cfg(feature = "postgres")]
73pub use pg_migration::{PgMigration, PgMigrationRunner};
74#[cfg(feature = "postgres")]
75pub use postgres_store::PostgresTaskStore;
76#[cfg(feature = "postgres")]
77pub use tenant_postgres_store::TenantAwarePostgresTaskStore;