Expand description
Partition families, keys, and routing helpers.
§Opaque wire keys (issue #91)
Public wire surfaces carry PartitionKey — an opaque
#[serde(transparent)] newtype over the hash-tag literal
("{fp:7}") — rather than the internal Partition struct. The
PartitionFamily enum (including its Execution / Flow
alias) remains a public ff-core type — in-tree consumers that
construct a Partition directly still name it — but it is no
longer part of the HTTP / SDK wire DTOs, so external consumers
never deserialize it off the wire.
§Migration note (0.2 → 0.3)
The HTTP response body for POST /v1/workers/{id}/claim changed
from
{
"execution_id": "{fp:7}:...",
"partition_family": "flow",
"partition_index": 7,
"grant_key": "...",
"expires_at_ms": 0
}to
{
"execution_id": "{fp:7}:...",
"partition_key": "{fp:7}",
"grant_key": "...",
"expires_at_ms": 0
}Consumers that need the parsed family/index call
PartitionKey::parse (or crate::contracts::ClaimGrant::partition /
crate::contracts::ReclaimGrant::partition) — these return a
typed Partition so routing code stays unchanged.
The Execution family label collapses to Flow on round-trip
(both produce {fp:N} under RFC-011 §11 co-location). Consumers
that read grant.partition()?.family for LOGGING will see
Flow where Execution previously appeared — cosmetically
visible, routing-equivalent. See PartitionKey rustdoc for
the full contract.
Structs§
- Crc16
Solo Partitioner - Default
SoloPartitioner:crc16_ccitt(lane_utf8) % num_flow_partitions. - Partition
- A resolved partition within a family.
- Partition
Config - Partition counts for each family. Fixed at deployment time.
- Partition
Key - Opaque routing handle for a partition, as exchanged on public wire surfaces.
Enums§
- Partition
Family - The partition families in FlowFabric.
- Partition
KeyParse Error - Errors produced when parsing a
PartitionKeyback into aPartition.
Traits§
- Solo
Partitioner - Strategy for picking a solo execution’s partition from its lane id.
Functions§
- budget_
partition - Compute the partition for a budget ID.
- execution_
partition - Compute the partition for an execution ID.
- flow_
partition - Compute the partition for a flow ID.
- quota_
partition - Compute the partition for a quota policy (by scope ID).
- solo_
partition - Compute the partition for a solo (flow-less) execution’s lane shard.
- solo_
partition_ with - Compute the partition for a solo execution using a custom
SoloPartitionerstrategy.