@earth-app/collegedb
    Preparing search index...

    Function listKnownShards

    • Lists all known shards

      Returns an array of all shard binding names known to the system. First attempts to get the list from the Durable Object coordinator for the most up-to-date information, then falls back to the configured shards if the coordinator is unavailable.

      Returns Promise<string[]>

      Promise resolving to array of shard binding names

      const shards = await listKnownShards();
      console.log('Available shards:', shards);
      // Output: ['db-east', 'db-west', 'db-central']

      // Check if a specific shard is available
      if (shards.includes('db-asia')) {
      console.log('Asia region shard is available');
      }