mirror of
https://github.com/coder/coder.git
synced 2025-07-09 11:45:56 +00:00
feat: use v2 API for agent lifecycle updates (#12278)
Agent uses the v2 API to post lifecycle updates. Part of #10534
This commit is contained in:
@ -485,6 +485,9 @@ type PostLifecycleRequest struct {
|
||||
ChangedAt time.Time `json:"changed_at"`
|
||||
}
|
||||
|
||||
// PostLifecycle posts the agent's lifecycle to the Coder server.
|
||||
//
|
||||
// Deprecated: Use UpdateLifecycle on the dRPC API instead
|
||||
func (c *Client) PostLifecycle(ctx context.Context, req PostLifecycleRequest) error {
|
||||
res, err := c.SDK.Request(ctx, http.MethodPost, "/api/v2/workspaceagents/me/report-lifecycle", req)
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user