Skip to content

Commit

Permalink
awslogs: Replace depreacted WithEndpointResolver usage
Browse files Browse the repository at this point in the history
Signed-off-by: Paweł Gronowski <[email protected]>
  • Loading branch information
vvoland committed Feb 14, 2024
1 parent 70a4a9c commit 2aa13e9
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions daemon/logger/awslogs/cloudwatchlogs.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2aa13e9

Please sign in to comment.