From 2aa13e950ddefedebe7cc8cdbcb59e472c847f78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Gronowski?= Date: Wed, 14 Feb 2024 18:34:12 +0100 Subject: [PATCH] awslogs: Replace depreacted WithEndpointResolver usage MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Paweł Gronowski --- daemon/logger/awslogs/cloudwatchlogs.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/daemon/logger/awslogs/cloudwatchlogs.go b/daemon/logger/awslogs/cloudwatchlogs.go index d093a6cba65ae..3d90cb4504df8 100644 --- a/daemon/logger/awslogs/cloudwatchlogs.go +++ b/daemon/logger/awslogs/cloudwatchlogs.go @@ -406,12 +406,11 @@ func newAWSLogsClient(info logger.Info, configOpts ...func(*config.LoadOptions) clientOpts = append( clientOpts, cloudwatchlogs.WithAPIOptions(middleware.AddUserAgentKeyValue("Docker", dockerversion.Version)), + func(o *cloudwatchlogs.Options) { + o.BaseEndpoint = endpoint + }, ) - if endpoint != nil { - clientOpts = append(clientOpts, cloudwatchlogs.WithEndpointResolver(cloudwatchlogs.EndpointResolverFromURL(*endpoint))) - } - client := cloudwatchlogs.NewFromConfig(cfg, clientOpts...) return client, nil