Skip to content

Instantly share code, notes, and snippets.

@mcastilho
Created August 30, 2017 20:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mcastilho/bf9d3552317531b5ad8a47a9eaca1879 to your computer and use it in GitHub Desktop.
Save mcastilho/bf9d3552317531b5ad8a47a9eaca1879 to your computer and use it in GitHub Desktop.
var Queue chan Payload
func init() {
Queue = make(chan Payload, MAX_QUEUE)
}
func payloadHandler(w http.ResponseWriter, r *http.Request) {
...
// Go through each payload and queue items individually to be posted to S3
for _, payload := range content.Payloads {
Queue <- payload
}
...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment