From 3e941306691a8fff8c912d007f7802326485c54e Mon Sep 17 00:00:00 2001 From: Nathan Smith Date: Mon, 27 May 2019 19:38:04 -0700 Subject: [PATCH] Update cloudwatch2 to latest upstream API. A name change in the upstream AWS SDK caused breakage in cloudwatch2 metrics. This commits updates our usage of the API to match the new upstream naming. --- metrics/cloudwatch2/cloudwatch2.go | 4 ++-- metrics/cloudwatch2/cloudwatch2_test.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/metrics/cloudwatch2/cloudwatch2.go b/metrics/cloudwatch2/cloudwatch2.go index b25b39243..a55397772 100644 --- a/metrics/cloudwatch2/cloudwatch2.go +++ b/metrics/cloudwatch2/cloudwatch2.go @@ -32,7 +32,7 @@ type CloudWatch struct { mtx sync.RWMutex sem chan struct{} namespace string - svc cloudwatchiface.CloudWatchAPI + svc cloudwatchiface.ClientAPI counters *lv.Space logger log.Logger numConcurrentRequests int @@ -66,7 +66,7 @@ func WithConcurrentRequests(n int) Option { // Namespace is applied to all created metrics and maps to the CloudWatch namespace. // Callers must ensure that regular calls to Send are performed, either // manually or with one of the helper methods. -func New(namespace string, svc cloudwatchiface.CloudWatchAPI, options ...Option) *CloudWatch { +func New(namespace string, svc cloudwatchiface.ClientAPI, options ...Option) *CloudWatch { cw := &CloudWatch{ namespace: namespace, svc: svc, diff --git a/metrics/cloudwatch2/cloudwatch2_test.go b/metrics/cloudwatch2/cloudwatch2_test.go index 55b01bf78..aa881798c 100644 --- a/metrics/cloudwatch2/cloudwatch2_test.go +++ b/metrics/cloudwatch2/cloudwatch2_test.go @@ -73,7 +73,7 @@ func TestStats(t *testing.T) { } type mockCloudWatch struct { - cloudwatchiface.CloudWatchAPI + cloudwatchiface.ClientAPI latestName string latestData []cloudwatch.MetricDatum }