1009 B
1009 B
Actor Configuration
Source:
src/content/docs/general/actor-configuration.mdxCanonical URL: https://rivet.dev/docs/general/actor-configuration Description: This page documents the configuration options available when defining a RivetKit actor. The actor configuration is passed to theactor()function.
Basic Example
import { actor, setup } from "rivetkit";
const myActor = actor({
state: { count: 0 },
actions: {
increment: (c) => {
c.state.count++;
return c.state.count;
},
},
options: {
actionTimeout: 15_000,
}
});
const registry = setup({
use: { myActor },
});
Configuration Reference
Related
- Registry Configuration: Configure the RivetKit registry
- State: Managing actor state
- Actions: Defining actor actions
- Lifecycle: Actor lifecycle hooks
Source doc path: /docs/general/actor-configuration