Cloudflare Workers Inline Client Example

Simple example demonstrating accessing Rivet Actors via Cloudflare Workers without exposing a public API. This uses the `createInlineClient` function to connect directly to your Durable Object.

Features

  • Inline client access: Call actor actions directly from Cloudflare Worker without HTTP overhead
  • Private actor APIs: Actors not exposed via public HTTP endpoints
  • Edge-native execution: Actors and workers run together on Cloudflare's edge network
  • Type-safe communication: Full TypeScript type safety between worker and actor

Implementation

This example demonstrates using inline clients to call actors privately within Cloudflare Workers:

  • Actor Definition (src/backend/registry.ts): Shows how to use createInlineClient for direct actor access without public HTTP endpoints

Resources

Read more about Cloudflare Workers integration and actions.