]> git.immae.eu Git - github/fretlink/terraform-provider-statuscake.git/blobdiff - vendor/github.com/aws/aws-sdk-go/aws/context_1_5.go
Upgrade to 0.12
[github/fretlink/terraform-provider-statuscake.git] / vendor / github.com / aws / aws-sdk-go / aws / context_1_5.go
similarity index 58%
rename from vendor/github.com/aws/aws-sdk-go/aws/context.go
rename to vendor/github.com/aws/aws-sdk-go/aws/context_1_5.go
index 79f426853b5d853cec57166bf40bd909ec55d397..2866f9a7fb9d7c4beee9077db27484500b04b580 100644 (file)
@@ -1,8 +1,8 @@
+// +build !go1.9
+
 package aws
 
-import (
-       "time"
-)
+import "time"
 
 // Context is an copy of the Go v1.7 stdlib's context.Context interface.
 // It is represented as a SDK interface to enable you to use the "WithContext"
@@ -35,37 +35,3 @@ type Context interface {
        // functions.
        Value(key interface{}) interface{}
 }
-
-// BackgroundContext returns a context that will never be canceled, has no
-// values, and no deadline. This context is used by the SDK to provide
-// backwards compatibility with non-context API operations and functionality.
-//
-// Go 1.6 and before:
-// This context function is equivalent to context.Background in the Go stdlib.
-//
-// Go 1.7 and later:
-// The context returned will be the value returned by context.Background()
-//
-// See https://golang.org/pkg/context for more information on Contexts.
-func BackgroundContext() Context {
-       return backgroundCtx
-}
-
-// SleepWithContext will wait for the timer duration to expire, or the context
-// is canceled. Which ever happens first. If the context is canceled the Context's
-// error will be returned.
-//
-// Expects Context to always return a non-nil error if the Done channel is closed.
-func SleepWithContext(ctx Context, dur time.Duration) error {
-       t := time.NewTimer(dur)
-       defer t.Stop()
-
-       select {
-       case <-t.C:
-               break
-       case <-ctx.Done():
-               return ctx.Err()
-       }
-
-       return nil
-}