Skip to main content

BackendLeaseClient

Trait BackendLeaseClient 

Source
pub trait BackendLeaseClient {
    // Required methods
    fn claim(&self, change_id: &str) -> Result<ClaimResult, BackendError>;
    fn release(&self, change_id: &str) -> Result<ReleaseResult, BackendError>;
    fn allocate(&self) -> Result<AllocateResult, BackendError>;
}
Expand description

Port for backend lease operations (claim, release, allocate).

Implementations handle HTTP communication and token management. The domain layer uses this trait to remain decoupled from transport.

Required Methods§

Source

fn claim(&self, change_id: &str) -> Result<ClaimResult, BackendError>

Claim a lease on a change.

Source

fn release(&self, change_id: &str) -> Result<ReleaseResult, BackendError>

Release a held lease.

Source

fn allocate(&self) -> Result<AllocateResult, BackendError>

Request the backend to allocate the next available change.

Implementors§