7 // An emptyCtx is a copy of the Go 1.7 context.emptyCtx type. This is copied to
8 // provide a 1.6 and 1.5 safe version of context that is compatible with Go
11 // An emptyCtx is never canceled, has no values, and has no deadline. It is not
12 // struct{}, since vars of this type must have distinct addresses.
15 func (*emptyCtx) Deadline() (deadline time.Time, ok bool) {
19 func (*emptyCtx) Done() <-chan struct{} {
23 func (*emptyCtx) Err() error {
27 func (*emptyCtx) Value(key interface{}) interface{} {
31 func (e *emptyCtx) String() string {
34 return "aws.BackgroundContext"
36 return "unknown empty Context"
40 backgroundCtx = new(emptyCtx)
43 // BackgroundContext returns a context that will never be canceled, has no
44 // values, and no deadline. This context is used by the SDK to provide
45 // backwards compatibility with non-context API operations and functionality.
48 // This context function is equivalent to context.Background in the Go stdlib.
51 // The context returned will be the value returned by context.Background()
53 // See https://golang.org/pkg/context for more information on Contexts.
54 func BackgroundContext() Context {