-
Notifications
You must be signed in to change notification settings - Fork 114
docs: clean up separation between actors/containers/functions #2394
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
How to use the Graphite Merge QueueAdd the label merge-queue to this PR to add it to the merge queue. You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
Merge activity
|
<!-- Please make sure there is an issue that this PR is correlated to. --> ## Changes <!-- If there are frontend changes, please include screenshots. -->
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
This PR reorganizes the documentation to establish clearer distinctions between Rivet's three main components: Actors, Containers, and Functions.
- Added new
/docs/functions.mdx
introducing serverless function capabilities with configuration and routing details - Updated
site/_redirects
to map legacy runtime URLs to their new counterparts (/docs/javascript-runtime
→/docs/actors
,/docs/container-runtime
→/docs/containers
) - Added route-related API documentation in
/site/src/content/docs/api/routes/
for list, update, and delete operations - Modified
generateApi.js
to include routes-related API endpoints in documentation generation - Renamed and restructured documentation files to use consistent terminology across actors, containers, and functions
15 file(s) reviewed, 8 comment(s)
Edit PR Review Bot Settings | Greptile
/> | ||
<ExampleLink | ||
href="docs/functions" | ||
title="Rivet Functions" | ||
size="md" | ||
icon={faTs} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logic: using faTs icon for Functions section seems incorrect - should use faFunction icon instead
<ExampleLink | ||
href="docs/quickstart/typescript" | ||
title="TypeScript" | ||
href="docs/actors" | ||
title="Rivet Actors" | ||
size="md" | ||
icon={faActors} | ||
/> | ||
<ExampleLink | ||
href="docs/containers" | ||
title="Rivet Containers" | ||
size="md" | ||
icon={faServer} | ||
/> | ||
<ExampleLink | ||
href="docs/functions" | ||
title="Rivet Functions" | ||
size="md" | ||
icon={faTs} | ||
/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style: grid layout with 3 items in 2 columns will result in uneven distribution - consider adjusting grid-cols-2 to grid-cols-3 or grid-cols-1
await RIVET.routes.delete({ | ||
// Add your request body here | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logic: Example code is missing required 'id' parameter which is marked as required in schema
await RIVET.routes.delete({ | |
// Add your request body here | |
}); | |
await RIVET.routes.delete({ | |
id: "route-id", // Required: The ID of the route to delete | |
}); |
|
||
// Make request | ||
await RIVET.routes.list({ | ||
// Add your request body here |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logic: Example request body should be removed since this GET endpoint doesn't accept a request body
// Add your request body here | |
// Optional query parameters: project, environment |
|
||
export default { | ||
async start(ctx: ActorContext) { | ||
// Get the port from environment variables or use a default | ||
const port = parseInt(process.env.PORT_HTTP || "8080"); | ||
const port = parseInt(Deno.env.get("PORT_HTTP") || "8080"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logic: Using Deno.env.get() but npm installing @rivet-gg/actor - need to clarify if this is a Deno or Node.js environment
<CodeGroup title='Request' tag='GET' label='https://api.rivet.gg/routes'> | ||
|
||
```bash {{ "title": "cURL" }} | ||
curl -X GET 'https://api.rivet.gg/routes' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style: Missing project and environment query parameters in cURL example
| `path` | The URL path to route requests to (cannot end with `/`) | | ||
| `route_subpaths` | When true, routes requests to this path and all nested subpaths to this function | | ||
| `strip_prefix` | When true, removes the configured path prefix from the request URL before forwarding to your function | | ||
| `resources.cpu` | CPU allocation for the function (defaults to 1) | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logic: CPU value of 1 is ambiguous - should clarify if this means 1 core (1000 millicores) or 1 millicore
const { Hono } = require('hono'); | ||
const { serve } = require('hono/node-server'); | ||
const app = new Hono(); | ||
const port = process.env.PORT_HTTP || 8080; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style: PORT_HTTP environment variable usage should be consistent with networking.internal_port config option mentioned later
Changes