Skip to content

Commit

Permalink
add batch
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristianKniep committed Aug 8, 2024
1 parent 6991ba3 commit 8ee8f9b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
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

0 comments on commit 8ee8f9b

Please sign in to comment.