mirror of
https://github.com/coder/coder.git
synced 2025-07-09 11:45:56 +00:00
feat: use v2 API for agent metadata updates (#12281)
Switches the agent to report metadata over the v2 API. Fixes #10534
This commit is contained in:
@ -85,6 +85,9 @@ type PostMetadataRequest struct {
|
||||
// performance.
|
||||
type PostMetadataRequestDeprecated = codersdk.WorkspaceAgentMetadataResult
|
||||
|
||||
// PostMetadata posts agent metadata to the Coder server.
|
||||
//
|
||||
// Deprecated: use BatchUpdateMetadata on the agent dRPC API instead
|
||||
func (c *Client) PostMetadata(ctx context.Context, req PostMetadataRequest) error {
|
||||
res, err := c.SDK.Request(ctx, http.MethodPost, "/api/v2/workspaceagents/me/metadata", req)
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user