Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/runware_serverless.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@ Deploy, monitor, and manage Runware serverless applications on the platform
* [runware serverless gpus](runware_serverless_gpus.md) - List available GPU types and pricing
* [runware serverless open](runware_serverless_open.md) - Open an application in the Runware dashboard
* [runware serverless secrets](runware_serverless_secrets.md) - Manage organisation secrets for serverless applications
* [runware serverless usage](runware_serverless_usage.md) - Show serverless usage and billing events
* [runware serverless usage](runware_serverless_usage.md) - Show account-wide usage and cost
* [runware serverless use](runware_serverless_use.md) - Set the default serverless application

2 changes: 1 addition & 1 deletion docs/runware_serverless_apps.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ runware serverless apps [flags]
* [runware serverless apps show](runware_serverless_apps_show.md) - Show details for a serverless application
* [runware serverless apps stop](runware_serverless_apps_stop.md) - Stop a serverless application
* [runware serverless apps tasks](runware_serverless_apps_tasks.md) - List and inspect application tasks
* [runware serverless apps usage](runware_serverless_apps_usage.md) - Show usage for a serverless application
* [runware serverless apps usage](runware_serverless_apps_usage.md) - Show usage and cost for a serverless application
* [runware serverless apps versions](runware_serverless_apps_versions.md) - Manage application versions
* [runware serverless apps workers](runware_serverless_apps_workers.md) - List workers for a serverless application

9 changes: 8 additions & 1 deletion docs/runware_serverless_apps_logs.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,21 @@

Show logs for a serverless application

### Synopsis

Show application logs.

This command is not implemented yet. The log-query route exists but currently
answers 404 until a follow-up ADR; live tail is not supported.

```
runware serverless apps logs <appId> [flags]
```

### Examples

```
# fetch or stream logs for an application
# show application logs (not available yet)
runware serverless apps logs my-app
```

Expand Down
12 changes: 10 additions & 2 deletions docs/runware_serverless_apps_usage.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
## runware serverless apps usage

Show usage for a serverless application
Show usage and cost for a serverless application

### Synopsis

Show an aggregated usage and cost report for one application.

This command is not implemented yet. Billing rollups are not in the API, so
there is no per-app report to list. When the report API exists, this will be
the account-wide usage command scoped to one appId.

```
runware serverless apps usage <appId> [flags]
Expand All @@ -9,7 +17,7 @@ runware serverless apps usage <appId> [flags]
### Examples

```
# show usage events for an application
# show usage for an application (not available yet)
runware serverless apps usage my-app
```

Expand Down
15 changes: 13 additions & 2 deletions docs/runware_serverless_usage.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
## runware serverless usage

Show serverless usage and billing events
Show account-wide usage and cost

### Synopsis

Show an aggregated usage and cost report for the authenticated organisation.

This command is not implemented yet. Billing rollups are not in the API, so
there is no report to list. Raw worker-transition rows (GET /v1/usage) are
not this command.

When the report API exists, this will cover an account-wide window with the
filters that endpoint exposes.

```
runware serverless usage [flags]
Expand All @@ -9,7 +20,7 @@ runware serverless usage [flags]
### Examples

```
# list usage events for the authenticated organisation
# show account-wide usage (not available yet)
runware serverless usage
```

Expand Down
21 changes: 16 additions & 5 deletions internal/cmd/serverless/apps.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,13 +188,18 @@ func newAppsEndpointsCmd(logger *log.Logger) *cobra.Command {
}

func newAppsLogsCmd() *cobra.Command {
return stubLeaf(
cmd := stubLeaf(
"logs <appId>",
"Show logs for a serverless application",
` # fetch or stream logs for an application
` # show application logs (not available yet)
runware serverless apps logs my-app`,
cobra.ExactArgs(1),
)
cmd.Long = `Show application logs.

This command is not implemented yet. The log-query route exists but currently
answers 404 until a follow-up ADR; live tail is not supported.`
return cmd
}

func newAppsWorkersCmd(logger *log.Logger) *cobra.Command {
Expand Down Expand Up @@ -349,11 +354,17 @@ func listPageParams(limit int, cursor string) (*serverlessapi.Limit, *serverless
}

func newAppsUsageCmd() *cobra.Command {
return stubLeaf(
cmd := stubLeaf(
"usage <appId>",
"Show usage for a serverless application",
` # show usage events for an application
"Show usage and cost for a serverless application",
` # show usage for an application (not available yet)
runware serverless apps usage my-app`,
cobra.ExactArgs(1),
)
cmd.Long = `Show an aggregated usage and cost report for one application.

This command is not implemented yet. Billing rollups are not in the API, so
there is no per-app report to list. When the report API exists, this will be
the account-wide usage command scoped to one appId.`
return cmd
}
15 changes: 12 additions & 3 deletions internal/cmd/serverless/usage.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,20 @@ package serverless
import "github.com/spf13/cobra"

func newUsageCmd() *cobra.Command {
return stubLeaf(
cmd := stubLeaf(
"usage",
"Show serverless usage and billing events",
` # list usage events for the authenticated organisation
"Show account-wide usage and cost",
` # show account-wide usage (not available yet)
runware serverless usage`,
cobra.NoArgs,
)
cmd.Long = `Show an aggregated usage and cost report for the authenticated organisation.

This command is not implemented yet. Billing rollups are not in the API, so
there is no report to list. Raw worker-transition rows (GET /v1/usage) are
not this command.

When the report API exists, this will cover an account-wide window with the
filters that endpoint exposes.`
return cmd
}