#[non_exhaustive]pub struct IssueClaimGrantArgs {
pub execution_id: ExecutionId,
pub lane_id: LaneId,
pub worker_id: WorkerId,
pub worker_instance_id: WorkerInstanceId,
pub partition: Partition,
pub capability_hash: Option<String>,
pub route_snapshot_json: Option<String>,
pub admission_summary: Option<String>,
pub worker_capabilities: BTreeSet<String>,
pub grant_ttl_ms: u64,
pub now: TimestampMs,
}Expand description
Inputs to crate::engine_backend::EngineBackend::issue_claim_grant
— the trait-level entry point v0.12 PR-5 lifted out of the SDK-side
FlowFabricWorker::claim_next inline helper.
#[non_exhaustive] + ::new per
feedback_non_exhaustive_needs_constructor: future fields may be
added in minor releases; consumers MUST construct via
Self::new and populate optional fields (capability_hash,
route_snapshot_json, admission_summary) by direct field
assignment on the returned value. Struct-literal construction is
blocked by #[non_exhaustive]; ..Default::default() is not
available for the same reason.
Carries the execution’s crate::partition::Partition so the
Valkey backend can derive exec_core / claim_grant / the lane’s
eligible_zset KEYS without a second round-trip.
Does NOT derive Serialize / Deserialize — this is a
trait-boundary args struct, not a wire-format type; the
#[non_exhaustive] marker already blocks cross-crate struct-
literal construction, which matters more than JSON round-trip
for a scanner hot-path primitive.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.execution_id: ExecutionId§lane_id: LaneId§worker_id: WorkerId§worker_instance_id: WorkerInstanceId§partition: PartitionPartition context for KEYS derivation. v0.12 PR-5.
capability_hash: Option<String>§route_snapshot_json: Option<String>§admission_summary: Option<String>§worker_capabilities: BTreeSet<String>Capabilities this worker advertises. Serialized as a sorted,
comma-separated string to the Lua FCALL (see scheduling.lua
ff_issue_claim_grant). An empty set matches only executions whose
required_capabilities is also empty.
grant_ttl_ms: u64§now: TimestampMsCaller-side timestamp for bookkeeping. NOT passed to the Lua FCALL —
ff_issue_claim_grant uses redis.call("TIME") for grant_expires_at.
Implementations§
Source§impl IssueClaimGrantArgs
impl IssueClaimGrantArgs
Sourcepub fn new(
execution_id: ExecutionId,
lane_id: LaneId,
worker_id: WorkerId,
worker_instance_id: WorkerInstanceId,
partition: Partition,
worker_capabilities: BTreeSet<String>,
grant_ttl_ms: u64,
now: TimestampMs,
) -> Self
pub fn new( execution_id: ExecutionId, lane_id: LaneId, worker_id: WorkerId, worker_instance_id: WorkerInstanceId, partition: Partition, worker_capabilities: BTreeSet<String>, grant_ttl_ms: u64, now: TimestampMs, ) -> Self
Construct an IssueClaimGrantArgs. Added alongside
#[non_exhaustive] per feedback_non_exhaustive_needs_constructor
so the SDK worker (and any future caller) can build the args
without the struct literal becoming a cross-crate breaking
change on every minor release.
Trait Implementations§
Source§impl Clone for IssueClaimGrantArgs
impl Clone for IssueClaimGrantArgs
Source§fn clone(&self) -> IssueClaimGrantArgs
fn clone(&self) -> IssueClaimGrantArgs
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more