You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 22, 2025. It is now read-only.
- Instead of returning errors as raw HTTP responses with c.json, use or write an error in packages/rivetkit/src/worker/errors.ts and throw that instead. The middleware will automatically serialize the response for you.
122
+
- Instead of returning errors as raw HTTP responses with c.json, use or write an error in packages/rivetkit/src/actor/errors.ts and throw that instead. The middleware will automatically serialize the response for you.
123
123
124
124
## Project Structure
125
125
@@ -140,7 +140,7 @@ This ensures imports resolve correctly across different build environments and p
140
140
141
141
## Test Guidelines
142
142
143
-
- Do not check if errors are an instanceOf WorkerError in tests. Many error types do not have the same prototype chain when sent over the network, but still have the same properties so you can safely cast with `as`.
143
+
- Do not check if errors are an instanceOf ActorError in tests. Many error types do not have the same prototype chain when sent over the network, but still have the same properties so you can safely cast with `as`.
See [Create & Manage Workers](/docs/manage) for more information.
38
+
See [Create & Manage Actors](/docs/manage) for more information.
39
39
40
40
## Available regions
41
41
@@ -45,6 +45,6 @@ See available regions [here](/docs/regions).
45
45
46
46
It's common to need to display a list of available regions in your application.
47
47
48
-
To fetch a full list of regions, you can use the `GET https://api.rivet.gg/regions` HTTP endpoint. See API documentation [here](/docs/api/worker/regions/list).
48
+
To fetch a full list of regions, you can use the `GET https://api.rivet.gg/regions` HTTP endpoint. See API documentation [here](/docs/api/actor/regions/list).
49
49
50
50
We don't recommend hard-coding the region list. This allows you to develop your application with a local development cluster.
Copy file name to clipboardExpand all lines: docs/concepts/external-sql.mdx
+14-14Lines changed: 14 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,9 +3,9 @@ title: External SQL Database
3
3
icon: database
4
4
---
5
5
6
-
While workers can serve as a complete database solution, they can also complement your existing databases. For example, you might use workers to handle frequently-changing data that needs real-time access, while keeping less frequently accessed data in your traditional database.
6
+
While actors can serve as a complete database solution, they can also complement your existing databases. For example, you might use actors to handle frequently-changing data that needs real-time access, while keeping less frequently accessed data in your traditional database.
7
7
8
-
Workers can be used with common SQL databases, such as PostgreSQL and MySQL.
8
+
Actors can be used with common SQL databases, such as PostgreSQL and MySQL.
9
9
10
10
## Libraries
11
11
@@ -35,8 +35,8 @@ There are several options for places to host your SQL database:
35
35
36
36
Here's a basic example of how you might set up a connection to a PostgreSQL database using the `pg` library:
Copy file name to clipboardExpand all lines: docs/concepts/logging.mdx
+10-10Lines changed: 10 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,11 +3,11 @@ title: Logging
3
3
icon: list-ul
4
4
---
5
5
6
-
Workers provide a built-in way to log complex data to the console.
6
+
Actors provide a built-in way to log complex data to the console.
7
7
8
8
When dealing with lots of data, `console.log` often doesn't cut it. Using the context's log object (`c.log`) allows you to log complex data using structured logging.
9
9
10
-
<Note>Using the worker logging API is completely optional.</Note>
10
+
<Note>Using the actor logging API is completely optional.</Note>
11
11
12
12
## Log levels
13
13
@@ -46,9 +46,9 @@ Consider this example:
46
46
<CodeGroup>
47
47
48
48
```typescript structured_logging.ts
49
-
import { worker } from"rivetkit";
49
+
import { actor } from"rivetkit";
50
50
51
-
const counter =worker({
51
+
const counter =actor({
52
52
state: { count: 0 },
53
53
54
54
actions: {
@@ -64,9 +64,9 @@ const counter = worker({
64
64
```
65
65
66
66
```typescript unstructured_logging.ts
67
-
import { worker } from"rivetkit";
67
+
import { actor } from"rivetkit";
68
68
69
-
const counter =worker({
69
+
const counter =actor({
70
70
state: { count: 0 },
71
71
72
72
actions: {
@@ -92,13 +92,13 @@ Additionally, structured logs can be parsed and queried at scale using tools lik
0 commit comments