1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
//! Bootstrap helpers for the SDK package
//!
//! This module creates the default infrastructure dependencies that the SDK
//! (`torrust-tracker-deployer-sdk`) needs, without requiring the SDK to import
//! from the infrastructure layer directly.
//!
//! The bootstrap layer is explicitly allowed to cross-cut all DDD layers for
//! dependency injection, which is why infrastructure types are imported here
//! rather than inside the SDK package.
use Arc;
use Duration;
use crateRepositoryProvider;
use crateFileRepositoryFactory;
use crateSystemClock;
use Clock;
/// The default file-lock timeout used by the SDK when no custom value is provided.
pub const DEFAULT_SDK_LOCK_TIMEOUT: Duration = from_secs;
/// Create the default repository provider backed by the file-based `FileRepositoryFactory`.
///
/// The SDK builder calls this to construct its provider without importing any
/// infrastructure type directly.
///
/// # Arguments
///
/// * `lock_timeout` — How long the repository factory waits to acquire a file lock.
/// Create the default system clock.
///
/// Returns a `SystemClock` wrapped in the `Clock` trait object so the SDK
/// builder does not need to import `SystemClock` from `crate::shared`.