Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

POC: Batch interegration #971

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions localstack.go
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,8 @@ var (
EC2 = Service{Name: "ec2", Port: "4597/tcp"}
ES = Service{Name: "es", Port: "4578/tcp"}
Firehose = Service{Name: "firehose", Port: "4573/tcp"}
// The port for batch is not correct
Batch = Service{Name: "batch", Port: "4593/tcp"}
IAM = Service{Name: "iam", Port: "4593/tcp"}
Kinesis = Service{Name: "kinesis", Port: "4568/tcp"}
Lambda = Service{Name: "lambda", Port: "4574/tcp"}
Expand Down
11 changes: 11 additions & 0 deletions resolver.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
"github.com/aws/aws-sdk-go-v2/service/dynamodb"
"github.com/aws/aws-sdk-go-v2/service/dynamodbstreams"
"github.com/aws/aws-sdk-go-v2/service/ec2"
"github.com/aws/aws-sdk-go-v2/service/batch"
"github.com/aws/aws-sdk-go-v2/service/elasticsearchservice"
"github.com/aws/aws-sdk-go-v2/service/firehose"
"github.com/aws/aws-sdk-go-v2/service/iam"
Expand Down Expand Up @@ -55,6 +56,16 @@ func (c *CloudwatchResolverV2) ResolveEndpoint(_ context.Context, _ cloudwatch.E
return resolveEndpoint(c.i.EndpointV2(CloudWatch))
}

// NewBatchResolver resolves the services ResolverV2 endpoint
func NewBatchResolverV2(i *Instance) *BatchResolverV2 {
return &BatchResolverV2{i: i}
}
type BatchResolverV2 struct{ i *Instance }

func (b *BatchResolverV2) ResolveEndpoint(_ context.Context, _ batch.EndpointParameters) (smithyendpoints.Endpoint, error) {
return resolveEndpoint(b.i.EndpointV2(Batch))
}

// NewCloudwatchLogsResolverV2 resolves the services ResolverV2 endpoint
func NewCloudwatchLogsResolverV2(i *Instance) *CloudwatchLogsResolverV2 {
return &CloudwatchLogsResolverV2{i: i}
Expand Down