feat: Add PostRestart method to API client for service restart operations

- Add PostRestart to request service restart via /api/v1/services/{name}/restart endpoint
- Add godoc comment describing restart functionality
This commit is contained in:
nutcas3
2026-04-17 16:21:27 +03:00
parent c484021db2
commit 5e70eac501
+5
View File
@@ -163,6 +163,11 @@ type Service struct {
Memory string `json:"memory"`
}
// PostRestart requests the API to restart the named service.
func (c *Client) PostRestart(name string) error {
return c.doPostJSON("/api/v1/services/"+name+"/restart", nil, nil)
}
// ListServices returns platform services
func (c *Client) ListServices() ([]Service, error) {
var resp struct {