]>
Commit | Line | Data |
---|---|---|
bae9f6d2 JC |
1 | // +build !go1.7 |
2 | ||
3 | package request | |
4 | ||
5 | import "github.com/aws/aws-sdk-go/aws" | |
6 | ||
7 | // setContext updates the Request to use the passed in context for cancellation. | |
8 | // Context will also be used for request retry delay. | |
9 | // | |
10 | // Creates shallow copy of the http.Request with the WithContext method. | |
11 | func setRequestContext(r *Request, ctx aws.Context) { | |
12 | r.context = ctx | |
13 | r.HTTPRequest.Cancel = ctx.Done() | |
14 | } |