client

package
v1.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 25, 2018 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrCodeNotImplemented      = "NotImplemented"
	ErrCodeValidationException = "ValidationException"
	ErrCodeServiceUnavailable  = "ServiceUnavailable"
	ErrCodeUnknown             = "Unknown"
)
View Source
const (
	OpGetItem        = "GetItem"
	OpPutItem        = "PutItem"
	OpUpdateItem     = "UpdateItem"
	OpDeleteItem     = "DeleteItem"
	OpBatchGetItem   = "BatchGetItem"
	OpBatchWriteItem = "BatchWriteItem"
	OpQuery          = "Query"
	OpScan           = "Scan"
)

Variables

This section is empty.

Functions

func ValidateConfig

func ValidateConfig(c aws.Config, isRequestConfig bool) error

func ValidateHandlers

func ValidateHandlers(h request.Handlers, expectDaxHandlers bool) error

func ValidateRequest

func ValidateRequest(r *request.Request) error

Types

type ClusterDaxClient

type ClusterDaxClient struct {
	// contains filtered or unexported fields
}

func New

func New(config Config) (*ClusterDaxClient, error)

func (*ClusterDaxClient) BatchGetItemWithOptions

func (*ClusterDaxClient) BatchWriteItemWithOptions

func (*ClusterDaxClient) Close

func (cc *ClusterDaxClient) Close() error

func (*ClusterDaxClient) DeleteItemWithOptions

func (*ClusterDaxClient) GetItemWithOptions

func (cc *ClusterDaxClient) GetItemWithOptions(input *dynamodb.GetItemInput, output *dynamodb.GetItemOutput, opt RequestOptions) (*dynamodb.GetItemOutput, error)

func (*ClusterDaxClient) NewDaxRequest

func (cc *ClusterDaxClient) NewDaxRequest(op *request.Operation, input, output interface{}, opt RequestOptions) *request.Request

func (*ClusterDaxClient) PutItemWithOptions

func (cc *ClusterDaxClient) PutItemWithOptions(input *dynamodb.PutItemInput, output *dynamodb.PutItemOutput, opt RequestOptions) (*dynamodb.PutItemOutput, error)

func (*ClusterDaxClient) QueryWithOptions

func (cc *ClusterDaxClient) QueryWithOptions(input *dynamodb.QueryInput, output *dynamodb.QueryOutput, opt RequestOptions) (*dynamodb.QueryOutput, error)

func (*ClusterDaxClient) ScanWithOptions

func (cc *ClusterDaxClient) ScanWithOptions(input *dynamodb.ScanInput, output *dynamodb.ScanOutput, opt RequestOptions) (*dynamodb.ScanOutput, error)

func (*ClusterDaxClient) UpdateItemWithOptions

type Config

type Config struct {
	MaxPendingConnectionsPerHost int
	ClusterUpdateThreshold       time.Duration
	ClusterUpdateInterval        time.Duration

	HostPorts   []string
	Region      string
	Credentials *credentials.Credentials
}

func DefaultConfig

func DefaultConfig() Config

type DaxAPI

type DaxAPI interface {
	PutItemWithOptions(input *dynamodb.PutItemInput, output *dynamodb.PutItemOutput, opt RequestOptions) (*dynamodb.PutItemOutput, error)
	DeleteItemWithOptions(input *dynamodb.DeleteItemInput, output *dynamodb.DeleteItemOutput, opt RequestOptions) (*dynamodb.DeleteItemOutput, error)
	UpdateItemWithOptions(input *dynamodb.UpdateItemInput, output *dynamodb.UpdateItemOutput, opt RequestOptions) (*dynamodb.UpdateItemOutput, error)

	GetItemWithOptions(input *dynamodb.GetItemInput, output *dynamodb.GetItemOutput, opt RequestOptions) (*dynamodb.GetItemOutput, error)
	ScanWithOptions(input *dynamodb.ScanInput, output *dynamodb.ScanOutput, opt RequestOptions) (*dynamodb.ScanOutput, error)
	QueryWithOptions(input *dynamodb.QueryInput, output *dynamodb.QueryOutput, opt RequestOptions) (*dynamodb.QueryOutput, error)

	BatchWriteItemWithOptions(input *dynamodb.BatchWriteItemInput, output *dynamodb.BatchWriteItemOutput, opt RequestOptions) (*dynamodb.BatchWriteItemOutput, error)
	BatchGetItemWithOptions(input *dynamodb.BatchGetItemInput, output *dynamodb.BatchGetItemOutput, opt RequestOptions) (*dynamodb.BatchGetItemOutput, error)

	NewDaxRequest(op *request.Operation, input, output interface{}, opt RequestOptions) *request.Request
	// contains filtered or unexported methods
}

type RequestOptions

type RequestOptions struct {
	LogLevel aws.LogLevelType
	Logger   aws.Logger

	RetryDelay   time.Duration
	MaxRetries   int
	SleepDelayFn func(time.Duration)
	Context      aws.Context
}

func (*RequestOptions) MergeFromRequestOptions

func (o *RequestOptions) MergeFromRequestOptions(ctx aws.Context, opts ...request.Option) error

type SingleDaxClient

type SingleDaxClient struct {
	// contains filtered or unexported fields
}

func NewSingleClient

func NewSingleClient(endpoint, region string, credentials *credentials.Credentials) (*SingleDaxClient, error)

func (*SingleDaxClient) BatchGetItemWithOptions

func (client *SingleDaxClient) BatchGetItemWithOptions(input *dynamodb.BatchGetItemInput, output *dynamodb.BatchGetItemOutput, opt RequestOptions) (*dynamodb.BatchGetItemOutput, error)

func (*SingleDaxClient) BatchWriteItemWithOptions

func (*SingleDaxClient) Close

func (client *SingleDaxClient) Close() error

func (*SingleDaxClient) DeleteItemWithOptions

func (client *SingleDaxClient) DeleteItemWithOptions(input *dynamodb.DeleteItemInput, output *dynamodb.DeleteItemOutput, opt RequestOptions) (*dynamodb.DeleteItemOutput, error)

func (*SingleDaxClient) GetItemWithOptions

func (client *SingleDaxClient) GetItemWithOptions(input *dynamodb.GetItemInput, output *dynamodb.GetItemOutput, opt RequestOptions) (*dynamodb.GetItemOutput, error)

func (*SingleDaxClient) NewDaxRequest

func (client *SingleDaxClient) NewDaxRequest(op *request.Operation, input, output interface{}, opt RequestOptions) *request.Request

func (*SingleDaxClient) PutItemWithOptions

func (client *SingleDaxClient) PutItemWithOptions(input *dynamodb.PutItemInput, output *dynamodb.PutItemOutput, opt RequestOptions) (*dynamodb.PutItemOutput, error)

func (*SingleDaxClient) QueryWithOptions

func (client *SingleDaxClient) QueryWithOptions(input *dynamodb.QueryInput, output *dynamodb.QueryOutput, opt RequestOptions) (*dynamodb.QueryOutput, error)

func (*SingleDaxClient) ScanWithOptions

func (client *SingleDaxClient) ScanWithOptions(input *dynamodb.ScanInput, output *dynamodb.ScanOutput, opt RequestOptions) (*dynamodb.ScanOutput, error)

func (*SingleDaxClient) UpdateItemWithOptions

func (client *SingleDaxClient) UpdateItemWithOptions(input *dynamodb.UpdateItemInput, output *dynamodb.UpdateItemOutput, opt RequestOptions) (*dynamodb.UpdateItemOutput, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL