Interface: aws.Context

import "../ibm-cos-sdk-go/aws"

Overview

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” API methods with Go v1.6 and a Context type such as golang.org/x/net/context.

See golang.org/pkg/context on how to use contexts.

Interface Method Summary collapse

Interface Method Details

Deadline() (deadline time.Time, ok bool)

This method is abstract.

Deadline returns the time when work done on behalf of this context should be canceled. Deadline returns ok==false when no deadline is set. Successive calls to Deadline return the same results.



16
// File 'aws/context_1_5.go', line 16

Deadline() (deadline time.Time, ok bool)

Done() <-chan struct{}

This method is abstract.

Done returns a channel that's closed when work done on behalf of this context should be canceled. Done may return nil if this context can never be canceled. Successive calls to Done return the same value.



21
// File 'aws/context_1_5.go', line 21

Done() <-chan struct{}

Err() error

This method is abstract.

Err returns a non-nil error value after Done is closed. Err returns Canceled if the context was canceled or DeadlineExceeded if the context's deadline passed. No other values for Err are defined. After Done is closed, successive calls to Err return the same value.



27
// File 'aws/context_1_5.go', line 27

Err() error

Value(key interface{}) interface{}

This method is abstract.

Value returns the value associated with this context for key, or nil if no value is associated with key. Successive calls to Value with the same key returns the same result.

Use context values only for request-scoped data that transits processes and API boundaries, not for passing optional parameters to functions.



36
// File 'aws/context_1_5.go', line 36

Value(key interface{}) interface{}