MCPcopy Create free account
hub / github.com/Thunder-Compute/thunder-cli / AddSSHKeyCtx

Method AddSSHKeyCtx

api/client.go:229–235  ·  view source on GitHub ↗
(ctx context.Context, instanceID string)

Source from the content-addressed store, hash-verified

227}
228
229func (c *Client) AddSSHKeyCtx(ctx context.Context, instanceID string) (*AddSSHKeyResponse, error) {
230 var resp AddSSHKeyResponse
231 if err := c.doRequest(ctx, "POST", fmt.Sprintf("/v1/instances/%s/add_key", instanceID), nil, &resp); err != nil {
232 return nil, err
233 }
234 return &resp, nil
235}
236
237func (c *Client) AddSSHKey(instanceID string) (*AddSSHKeyResponse, error) {
238 return c.AddSSHKeyCtx(context.Background(), instanceID)

Callers 1

AddSSHKeyMethod · 0.95

Calls 1

doRequestMethod · 0.95

Tested by

no test coverage detected