pub struct ClaimGrant {
pub execution_id: ExecutionId,
pub partition_key: PartitionKey,
pub grant_key: String,
pub expires_at_ms: u64,
}Expand description
A claim grant issued by the scheduler for a specific execution.
The worker uses this to call ff_claim_execution (or
ff_acquire_lease), which atomically consumes the grant and
creates the lease.
Shared wire-level type between ff-scheduler (issuer) and
ff-sdk (consumer, via FlowFabricWorker::claim_from_grant).
Lives in ff-core so neither crate needs a dep on the other.
Lane asymmetry with ReclaimGrant: ClaimGrant does NOT
carry lane_id. The issuing scheduler’s caller already picked
a lane (that’s how admission reached this grant) and passes it
through to claim_from_grant as a separate argument. The grant
handle stays narrow to what uniquely identifies the admission
decision. The matching field on ReclaimGrant is an
intentional divergence — see the note on that type.
Fields§
§execution_id: ExecutionIdThe execution that was granted.
partition_key: PartitionKeyOpaque partition handle for this execution’s hash-tag slot.
Public wire type: consumers pass it back to FlowFabric but
must not parse the interior hash tag for routing decisions.
Internal consumers that need the typed
crate::partition::Partition call Self::partition.
grant_key: StringThe Valkey key holding the grant hash (for the worker to reference).
expires_at_ms: u64When the grant expires if not consumed.
Implementations§
Source§impl ClaimGrant
impl ClaimGrant
Sourcepub fn partition(&self) -> Result<Partition, PartitionKeyParseError>
pub fn partition(&self) -> Result<Partition, PartitionKeyParseError>
Parse partition_key into a typed
crate::partition::Partition. Intended for internal
consumers (scheduler emitter, SDK worker claim path) that
need the family/index pair. Fails only on malformed keys
(which indicates a producer bug).
Alias collapse applies: a grant issued against Execution
family round-trips to Flow (see crate::partition::PartitionKey
for the rationale — routing is preserved, only the metadata
family label normalises).
Trait Implementations§
Source§impl Clone for ClaimGrant
impl Clone for ClaimGrant
Source§fn clone(&self) -> ClaimGrant
fn clone(&self) -> ClaimGrant
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more