14324: Remove context from interface, use Stop() instead
[arvados.git] / lib / dispatchcloud / instance_set_proxy.go
1 // Copyright (C) The Arvados Authors. All rights reserved.
2 //
3 // SPDX-License-Identifier: AGPL-3.0
4
5 package dispatchcloud
6
7 import (
8         "git.curoverse.com/arvados.git/lib/cloud"
9         "git.curoverse.com/arvados.git/sdk/go/arvados"
10         "golang.org/x/crypto/ssh"
11 )
12
13 type instanceSetProxy struct {
14         cloud.InstanceSet
15 }
16
17 func (is *instanceSetProxy) Create(it arvados.InstanceType, id cloud.ImageID, tags cloud.InstanceTags, pk ssh.PublicKey) (cloud.Instance, error) {
18         // TODO: return if Create failed recently with a RateLimitError or QuotaError
19         return is.InstanceSet.Create(it, id, tags, pk)
20 }
21
22 func (is *instanceSetProxy) Instances(tags cloud.InstanceTags) ([]cloud.Instance, error) {
23         // TODO: return if Instances failed recently with a RateLimitError
24         return is.InstanceSet.Instances(tags)
25 }