Durable Objects
Start here
Section titled “Start here”FlareDurableObjectBase class for Flare Durable Objects.durableResolves a named Durable Object stub from a typed namespace.DurableStateFramework service exposing a Durable Object’sDurableObjectState(ctx) as a per-instance singleton.
Classes
Section titled “Classes”DurableStateFramework service exposing a Durable Object’sDurableObjectState(ctx) as a per-instance singleton.FlareDurableObjectBase class for Flare Durable Objects.
Functions
Section titled “Functions”composeDurableInstanceComposes one DO instance’s per-instance lazy container, seedingDurableStateandBindingsfor the givenstateandenv, and returns aDurableHandleryou can drive in-process for white-box tests.durableResolves a named Durable Object stub from a typed namespace.makeEnvWraps a plain bindings object asCloudflare.Envfor passing tocomposeDurableInstanceor a terminal’sfetch(req, env, ctx)signature.makeFakeDurableStateBuilds a fakeDurableObjectStatefor unit-testing Flare’s per-instance DI without a real DO binding.makeFakeStorageMinimal in-memoryDurableObjectStoragestub covering the KV subset of the interface:get,put,delete, andlist.
DurableAddressingOptsOptions fordurable(...)placement.DurableStubThe stubdurable()returns: the native stub with a raw-tunnelfetchplus the state-carryingforward.