client - ActiveState ActiveGo 1.8
...

Package client

import "github.com/aws/aws-sdk-go/aws/client"
Overview
Index
Subdirectories

Overview ▾

type Client

A Client implements the base client request and response handling used by all service clients.

type Client struct {
    request.Retryer
    metadata.ClientInfo

    Config   aws.Config
    Handlers request.Handlers
}

func New

func New(cfg aws.Config, info metadata.ClientInfo, handlers request.Handlers, options ...func(*Client)) *Client

New will return a pointer to a new initialized service client.

func (*Client) AddDebugHandlers

func (c *Client) AddDebugHandlers()

AddDebugHandlers injects debug logging handlers into the service to log request debug information.

func (*Client) NewRequest

func (c *Client) NewRequest(operation *request.Operation, params interface{}, data interface{}) *request.Request

NewRequest returns a new Request pointer for the service API operation and parameters.

type Config

A Config provides configuration to a service client instance.

type Config struct {
    Config        *aws.Config
    Handlers      request.Handlers
    Endpoint      string
    SigningRegion string
    SigningName   string
}

type ConfigNoResolveEndpointProvider

ConfigNoResolveEndpointProvider same as ConfigProvider except it will not resolve the endpoint automatically. The service client's endpoint must be provided via the aws.Config.Endpoint field.

type ConfigNoResolveEndpointProvider interface {
    ClientConfigNoResolveEndpoint(cfgs ...*aws.Config) Config
}

type ConfigProvider

ConfigProvider provides a generic way for a service client to receive the ClientConfig without circular dependencies.

type ConfigProvider interface {
    ClientConfig(serviceName string, cfgs ...*aws.Config) Config
}

type DefaultRetryer

DefaultRetryer implements basic retry logic using exponential backoff for most services. If you want to implement custom retry logic, implement the request.Retryer interface or create a structure type that composes this struct and override the specific methods. For example, to override only the MaxRetries method:

		type retryer struct {
     service.DefaultRetryer
   }

   // This implementation always has 100 max retries
   func (d retryer) MaxRetries() uint { return 100 }
type DefaultRetryer struct {
    NumMaxRetries int
}

func (DefaultRetryer) MaxRetries

func (d DefaultRetryer) MaxRetries() int

MaxRetries returns the number of maximum returns the service will use to make an individual API request.

func (DefaultRetryer) RetryRules

func (d DefaultRetryer) RetryRules(r *request.Request) time.Duration

RetryRules returns the delay duration before retrying this request again

func (DefaultRetryer) ShouldRetry

func (d DefaultRetryer) ShouldRetry(r *request.Request) bool

ShouldRetry returns true if the request should be retried.

Subdirectories

Name Synopsis
..
metadata