Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bobgroup-go-utils
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Bob Public Utils
bobgroup-go-utils
Commits
761e6711
Commit
761e6711
authored
3 years ago
by
Johan de Klerk
Browse files
Options
Downloads
Patches
Plain Diff
Revert "Upload big sqs messages to s3"
This reverts commit
88de2e49
.
parent
88de2e49
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
sqs/sqs.go
+4
-4
4 additions, 4 deletions
sqs/sqs.go
with
4 additions
and
4 deletions
sqs/sqs.go
+
4
−
4
View file @
761e6711
...
...
@@ -26,7 +26,7 @@ type Messenger struct {
QueueName
string
QueueURL
string
Region
string
S3Session
*
s3
.
SessionWithHelpers
S3Session
s3
.
SessionWithHelpers
S3BucketName
string
}
...
...
@@ -106,7 +106,7 @@ func (m *Messenger) SendSQSMessage(headers map[string]string, body string, curre
return
*
res
.
MessageId
,
err
}
func
SendSQSMessage
(
msgr
Messenger
,
objectToSend
interface
{},
currentRequestID
*
string
,
sqsType
string
,
headerKey
string
,
messageGroupID
...
string
)
error
{
func
SendSQSMessage
(
msgr
*
Messenger
,
objectToSend
interface
{},
currentRequestID
*
string
,
sqsType
string
,
headerKey
string
,
messageGroupID
...
string
)
error
{
msgGrpID
:=
""
if
len
(
messageGroupID
)
>
0
&&
messageGroupID
[
0
]
!=
""
{
msgGrpID
=
messageGroupID
[
0
]
...
...
@@ -155,7 +155,7 @@ func SendSQSMessage(msgr Messenger, objectToSend interface{}, currentRequestID *
return
nil
}
func
uploadMessageToS3
(
session
*
s3
.
SessionWithHelpers
,
bucket
string
,
name
string
,
object
interface
{})
error
{
func
uploadMessageToS3
(
session
s3
.
SessionWithHelpers
,
bucket
string
,
name
string
,
object
interface
{})
error
{
messageBytes
,
err
:=
json
.
Marshal
(
object
)
if
err
!=
nil
{
return
err
...
...
@@ -173,7 +173,7 @@ func uploadMessageToS3(session *s3.SessionWithHelpers, bucket string, name strin
return
nil
}
func
RetrieveMessageFromS3
(
session
*
s3
.
SessionWithHelpers
,
bucket
string
,
filename
string
)
([]
byte
,
error
)
{
func
RetrieveMessageFromS3
(
session
s3
.
SessionWithHelpers
,
bucket
string
,
filename
string
)
([]
byte
,
error
)
{
// get the file contents
rawObject
,
err
:=
session
.
GetObject
(
bucket
,
filename
,
false
)
if
err
!=
nil
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment