diff --git a/go.mod b/go.mod index 4d238a6d..62b4e691 100644 --- a/go.mod +++ b/go.mod @@ -10,7 +10,7 @@ require ( github.com/golang/protobuf v1.5.4 github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 - github.com/hetznercloud/hcloud-go/v2 v2.11.0 + github.com/hetznercloud/hcloud-go/v2 v2.12.0 github.com/kubernetes-csi/csi-test/v5 v5.2.0 github.com/prometheus/client_golang v1.19.1 github.com/stretchr/testify v1.9.0 diff --git a/go.sum b/go.sum index c3615b50..5f9637b8 100644 --- a/go.sum +++ b/go.sum @@ -62,6 +62,8 @@ github.com/hetznercloud/hcloud-go/v2 v2.10.2 h1:9gyTUPhfNbfbS40Spgij5mV5k37bOZgt github.com/hetznercloud/hcloud-go/v2 v2.10.2/go.mod h1:xQ+8KhIS62W0D78Dpi57jsufWh844gUw1az5OUvaeq8= github.com/hetznercloud/hcloud-go/v2 v2.11.0 h1:U1wD58/trMnKO6aHy2i2aguT5USwWbzC2hWj3r2sidE= github.com/hetznercloud/hcloud-go/v2 v2.11.0/go.mod h1:dhix40Br3fDiBhwaSG/zgaYOFFddpfBm/6R1Zz0IiF0= +github.com/hetznercloud/hcloud-go/v2 v2.12.0 h1:nOgfNTo0gyXZJJdM8mo/XH5MO/e80wAEpldRzdWayhY= +github.com/hetznercloud/hcloud-go/v2 v2.12.0/go.mod h1:dhix40Br3fDiBhwaSG/zgaYOFFddpfBm/6R1Zz0IiF0= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= diff --git a/internal/api/volume_test.go b/internal/api/volume_test.go index fe776c4e..bc0e44c8 100644 --- a/internal/api/volume_test.go +++ b/internal/api/volume_test.go @@ -25,7 +25,7 @@ func makeTestVolumeService(t *testing.T, requests []mockutil.Request) (*VolumeSe testClient := hcloud.NewClient( hcloud.WithEndpoint(testServer.URL), hcloud.WithRetryOpts(hcloud.RetryOpts{BackoffFunc: hcloud.ConstantBackoff(0), MaxRetries: 3}), - hcloud.WithPollBackoffFunc(hcloud.ConstantBackoff(0)), + hcloud.WithPollOpts(hcloud.PollOpts{BackoffFunc: hcloud.ConstantBackoff(0)}), ) volumeService := NewVolumeService(log.NewNopLogger(), testClient) diff --git a/internal/app/app.go b/internal/app/app.go index 19baa66d..075515e5 100644 --- a/internal/app/app.go +++ b/internal/app/app.go @@ -148,7 +148,9 @@ func CreateHcloudClient(metricsRegistry *prometheus.Registry, logger log.Logger) pollingInterval = tmp } - opts = append(opts, hcloud.WithPollBackoffFunc(hcloud.ExponentialBackoff(2, time.Duration(pollingInterval)*time.Second))) + opts = append(opts, hcloud.WithPollOpts(hcloud.PollOpts{ + BackoffFunc: hcloud.ExponentialBackoff(2, time.Duration(pollingInterval)*time.Second), + })) return hcloud.NewClient(opts...), nil }