cf-colo-hint
A Rust library that maps Cloudflare edge locations (colos) to Durable Objects location hints.
Usage
use ;
// Parse a colo from the cf-ray header or request metadata
let colo = from_code.expect;
// Get the recommended location hint for Durable Objects
if let Some = colo.location_hint
// Work with location hints directly
let hint = WNam;
assert_eq!;
assert_eq!;
Features
no_stdcompatible- Zero dependencies
- Auto-generated from Cloudflare's status page and measured latency data
Data Sources
Colo data is sourced from:
- Cloudflare Status - colo names and regions
- where.durableobjects.live - measured latency data for DO region mapping
Updating Data
Run the refresh script to pull the latest data and regenerate the Rust code:
License
MIT