Skip to content

Commit

Permalink
docs: include resolver
Browse files Browse the repository at this point in the history
  • Loading branch information
mdelapenya committed Nov 6, 2024
1 parent 1101aac commit f3e785c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/modules/localstack.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ For further reference on the SDK v1, please check out the AWS docs [here](https:
### Using the AWS SDK v2
<!--codeinclude-->
[EndpointResolver](../../modules/localstack/v2/s3_test.go) inside_block:awsResolverV2
[AWS SDK v2](../../modules/localstack/v2/s3_test.go) inside_block:awsSDKClientV2
<!--/codeinclude-->
Expand Down
3 changes: 3 additions & 0 deletions modules/localstack/v2/s3_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ const (
region = "us-east-1"
)

// awsResolverV2 {
type resolverV2 struct {
// you could inject additional application context here as well
}
Expand All @@ -37,6 +38,8 @@ func (*resolverV2) ResolveEndpoint(ctx context.Context, params s3.EndpointParame
return s3.NewDefaultEndpointResolverV2().ResolveEndpoint(ctx, params)
}

// }

// awsSDKClientV2 {
func s3Client(ctx context.Context, l *localstack.LocalStackContainer) (*s3.Client, error) {
mappedPort, err := l.MappedPort(ctx, nat.Port("4566/tcp"))
Expand Down

0 comments on commit f3e785c

Please sign in to comment.