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
1,635 changes: 1,631 additions & 4 deletions docs/apis/docs.go

Large diffs are not rendered by default.

1,630 changes: 1,629 additions & 1 deletion docs/apis/swagger.json

Large diffs are not rendered by default.

63 changes: 61 additions & 2 deletions docs/apis/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -252,11 +252,19 @@ definitions:
properties:
boardID:
type: integer
busID:
description: |-
BusID is the GPU bus ID from the nvml API.
e.g., "0000:0f:00.0"
type: string
minorID:
type: string
sn:
type: string
uuid:
description: |-
UUID is the GPU UUID from the nvml API.
e.g., "GPU-46a3bbe2-3e87-3dde-b464-a03eba0c21d7"
type: string
type: object
github_com_leptonai_gpud_api_v1.MachineInfo:
Expand Down Expand Up @@ -318,6 +326,10 @@ definitions:
systemUUID:
description: SystemUUID comes from https://github.com/google/cadvisor/blob/master/utils/sysfs/sysfs.go#L442
type: string
tailscaleVersion:
description: TailscaleVersion represents the version of the tailscale client
binary (e.g. 1.76.6).
type: string
uptime:
description: Uptime represents when the machine up
type: string
Expand Down Expand Up @@ -558,8 +570,6 @@ definitions:
description: |-
Timeout is the timeout for the script execution.
If zero, it uses the default timeout (1-minute).
type:
type: string
type: object
github_com_leptonai_gpud_pkg_custom-plugins.Step:
properties:
Expand Down Expand Up @@ -628,6 +638,21 @@ definitions:
version:
type: string
type: object
pkg_server.SetHealthyStatesResponse:
properties:
code:
type: integer
failed:
additionalProperties:
type: string
type: object
message:
type: string
successful:
items:
type: string
type: array
type: object
v1.Duration:
properties:
time.Duration:
Expand All @@ -640,6 +665,7 @@ definitions:
- 1000000000
- 60000000000
- 3600000000000
format: int64
type: integer
x-enum-varnames:
- minDuration
Expand Down Expand Up @@ -965,6 +991,39 @@ paths:
summary: Get component events
tags:
- components
/v1/health-states/set-healthy:
post:
consumes:
- application/json
description: Sets specified components to healthy state if they implement the
HealthSettable interface. If no components specified, attempts to set all
components to healthy.
operationId: setHealthyStates
parameters:
- description: Comma-separated list of component names to set healthy (if empty,
sets all components)
in: query
name: components
type: string
produces:
- application/json
responses:
"200":
description: Components successfully set to healthy state
schema:
$ref: '#/definitions/pkg_server.SetHealthyStatesResponse'
"400":
description: Bad request - component does not support setting healthy state
or failed to parse components
schema:
$ref: '#/definitions/pkg_server.SetHealthyStatesResponse'
"404":
description: Component not found
schema:
$ref: '#/definitions/pkg_server.SetHealthyStatesResponse'
summary: Set components to healthy state
tags:
- components
/v1/info:
get:
consumes:
Expand Down
5 changes: 1 addition & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ require (
github.com/stretchr/testify v1.11.1
github.com/swaggo/files v1.0.1
github.com/swaggo/gin-swagger v1.6.0
github.com/swaggo/swag/v2 v2.0.0-rc4
github.com/swaggo/swag v1.16.6
github.com/urfave/cli v1.22.16
go.uber.org/zap v1.27.0
golang.org/x/crypto v0.51.0
Expand Down Expand Up @@ -120,8 +120,6 @@ require (
github.com/smartystreets/assertions v1.2.0 // indirect
github.com/smartystreets/goconvey v1.7.2 // indirect
github.com/stretchr/objx v0.5.2 // indirect
github.com/sv-tools/openapi v0.2.1 // indirect
github.com/swaggo/swag v1.8.12 // indirect
github.com/tailscale/go-winio v0.0.0-20231025203758-c4f33415bf55 // indirect
github.com/tailscale/goupnp v1.0.1-0.20210804011211-c64d0f06ea05 // indirect
github.com/tailscale/netlink v1.1.1-0.20240822203006-4d49adab4de7 // indirect
Expand Down Expand Up @@ -156,7 +154,6 @@ require (
google.golang.org/genproto/googleapis/rpc v0.0.0-20251202230838-ff82c1b0f217 // indirect
google.golang.org/protobuf v1.36.10 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
gotest.tools/v3 v3.5.1 // indirect
k8s.io/klog/v2 v2.130.1 // indirect
Expand Down
8 changes: 2 additions & 6 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -285,16 +285,12 @@ github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U=
github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
github.com/sv-tools/openapi v0.2.1 h1:ES1tMQMJFGibWndMagvdoo34T1Vllxr1Nlm5wz6b1aA=
github.com/sv-tools/openapi v0.2.1/go.mod h1:k5VuZamTw1HuiS9p2Wl5YIDWzYnHG6/FgPOSFXLAhGg=
github.com/swaggo/files v1.0.1 h1:J1bVJ4XHZNq0I46UU90611i9/YzdrF7x92oX1ig5IdE=
github.com/swaggo/files v1.0.1/go.mod h1:0qXmMNH6sXNf+73t65aKeB+ApmgxdnkQzVTAj2uaMUg=
github.com/swaggo/gin-swagger v1.6.0 h1:y8sxvQ3E20/RCyrXeFfg60r6H0Z+SwpTjMYsMm+zy8M=
github.com/swaggo/gin-swagger v1.6.0/go.mod h1:BG00cCEy294xtVpyIAHG6+e2Qzj/xKlRdOqDkvq0uzo=
github.com/swaggo/swag v1.8.12 h1:pctzkNPu0AlQP2royqX3apjKCQonAnf7KGoxeO4y64w=
github.com/swaggo/swag v1.8.12/go.mod h1:lNfm6Gg+oAq3zRJQNEMBE66LIJKM44mxFqhEEgy2its=
github.com/swaggo/swag/v2 v2.0.0-rc4 h1:SZ8cK68gcV6cslwrJMIOqPkJELRwq4gmjvk77MrvHvY=
github.com/swaggo/swag/v2 v2.0.0-rc4/go.mod h1:Ow7Y8gF16BTCDn8YxZbyKn8FkMLRUHekv1kROJZpbvE=
github.com/swaggo/swag v1.16.6 h1:qBNcx53ZaX+M5dxVyTrgQ0PJ/ACK+NzhwcbieTt+9yI=
github.com/swaggo/swag v1.16.6/go.mod h1:ngP2etMK5a0P3QBizic5MEwpRmluJZPHjXcMoj4Xesg=
github.com/tailscale/go-winio v0.0.0-20231025203758-c4f33415bf55 h1:Gzfnfk2TWrk8Jj4P4c1a3CtQyMaTVCznlkLZI++hok4=
github.com/tailscale/go-winio v0.0.0-20231025203758-c4f33415bf55/go.mod h1:4k4QO+dQ3R5FofL+SanAUZe+/QfeK0+OIuwDIRu2vSg=
github.com/tailscale/goupnp v1.0.1-0.20210804011211-c64d0f06ea05 h1:4chzWmimtJPxRs2O36yuGRW3f9SYV+bMTTvMBI0EKio=
Expand Down
2 changes: 1 addition & 1 deletion scripts/swag-gen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ set -o nounset
set -o errexit

# requires
# go install github.com/swaggo/swag/v2/cmd/swag@latest
# go install github.com/swaggo/swag/cmd/swag@1.16.6

# Generate swagger documentation
# --dir . : Search from root directory to find all Go files
Expand Down
Loading