use-partition-key 0.1.0

Partition and routing key primitives for RustUse
Documentation
  • Coverage
  • 76.92%
    20 out of 26 items documented1 out of 20 items with examples
  • Size
  • Source code size: 7.4 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 784.88 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 2s Average build duration of successful builds.
  • all releases: 2s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • RustUse/use-nosql
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • CloudBranch

use-partition-key

Partition and routing key primitives for RustUse.

Experimental

use-partition-key is experimental while use-nosql remains below 0.3.0.

Example

use use_partition_key::{CompositeKey, PartitionKey, PartitionStrategy};

let key = CompositeKey::new()
    .with_part(PartitionKey::new("tenant_1"))
    .with_part(PartitionKey::new("customer_1"));

assert_eq!(key.parts().len(), 2);
assert_eq!(PartitionStrategy::Hash.to_string(), "hash");

Scope

  • Partition, shard, routing, sort, and composite key labels.
  • Partition strategy descriptors.

Non-goals

  • Hashing implementations.
  • Cluster topology management.
  • Vendor-specific routing algorithms.

License

Licensed under either Apache-2.0 or MIT.