Skip to content

Commit

Permalink
options: Fix #8 Add WaitTimeSeconds
Browse files Browse the repository at this point in the history
  • Loading branch information
nabeken committed May 4, 2020
1 parent 56bf52b commit b159bc6
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions queue/option/option.go
Expand Up @@ -34,6 +34,14 @@ func MaxNumberOfMessages(n int64) ReceiveMessageInput {
}
}

// WaitTimeSeconds returns a ReceiveMessageInput that
// changes WaitTimeSeconds parameter.
func WaitTimeSeconds(n int64) ReceiveMessageInput {
return func(req *sqs.ReceiveMessageInput) {
req.WaitTimeSeconds = aws.Int64(n)
}
}

// UseAllAttribute returns a ReceiveMessageInput that
// changes a parameter to receive all messages regardless of attributes.
func UseAllAttribute() ReceiveMessageInput {
Expand Down

0 comments on commit b159bc6

Please sign in to comment.