This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* RpcDurableObject is a base class for DurableObjects that want to be called in an RPC style. Derive your object | |
* from this class and implement your methods as normal methods. There is no need to implement the fetch method. Then, | |
* use the buildRpcClient function to create a proxy object and call methods on the durable object as if it were a | |
* local object! | |
* | |
* This hides the complexity of calling a Durable Object from a worker and allows you to focus on the business logic | |
* of your application. It also allows you to use TypeScript to type your RPC methods; your worker and the proxy object | |
* should both implement the same interface containing the RPC methods. | |
* |
OlderNewer