Skip to content

Commit 52a9ad8

Browse files
author
Phil Cluff
committed
Implement hacky custom endpoint
1 parent ede5e38 commit 52a9ad8

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

service/sqs/sqs.go

+18
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,24 @@ func New(creds aws.CredentialsProvider, region string, client *http.Client) *SQS
4343
}
4444
}
4545

46+
func NewWithCustomEndpoint(creds aws.CredentialsProvider, endpoint string) {
47+
client := http.DefaultClient
48+
49+
return &SQS{
50+
client: &aws.QueryClient{
51+
Context: aws.Context{
52+
Credentials: creds,
53+
Service: "sqs",
54+
Region: "local",
55+
},
56+
Client: client,
57+
Endpoint: endpoint,
58+
APIVersion: "2012-11-05",
59+
},
60+
}
61+
62+
}
63+
4664
// AddPermission adds a permission to a queue for a specific principal .
4765
// This allows for sharing access to the queue. When you create a queue,
4866
// you have full control access rights for the queue. Only you (as owner of

0 commit comments

Comments
 (0)