provider
etrack.ports.provider
ports/provider: the contract of everything the lifespan opens — lifecycle, health and an orienting spec.
Isolation
Bases: StrEnum
How it can run without breaking — the axis an executor reads: the loop, a thread, a process, or one at a time.
Locality
Bases: StrEnum
Where the work happens. EMBEDDED is an adapter; every other value is a driver.
Provider
Bases: Protocol
A singleton the lifespan opens with async with and closes in reverse order; health never raises.
ProviderSpec
dataclass
ProviderSpec(
name: str,
locality: Locality,
workload: Workload,
isolation: Isolation,
fork_safe: bool = False,
pooled: bool = False,
warmup: bool = False,
memory_hint_mb: int | None = None,
)
Orienting metadata, readable without an instance: no layer must consult it, every provider must declare it.
Workload
Bases: StrEnum
What resource the work consumes.