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

Method CreateInstance

api/client.go:253–259  ·  view source on GitHub ↗
(req CreateInstanceRequest)

Source from the content-addressed store, hash-verified

251}
252
253func (c *Client) CreateInstance(req CreateInstanceRequest) (*CreateInstanceResponse, error) {
254 var resp CreateInstanceResponse
255 if err := c.doRequest(context.Background(), "POST", "/v1/instances/create", req, &resp); err != nil {
256 return nil, err
257 }
258 return &resp, nil
259}
260
261func (c *Client) DeleteInstance(instanceID string) (*DeleteInstanceResponse, error) {
262 if err := c.doRequest(context.Background(), "POST", fmt.Sprintf("/v1/instances/%s/delete", instanceID), nil, nil); err != nil {

Callers 2

createInstanceCmdFunction · 0.80
runCreateFunction · 0.80

Calls 1

doRequestMethod · 0.95

Tested by

no test coverage detected