sdkutil

package
v0.0.0-...-7638cb1 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2017 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package sdkutil provides utilities used to call awssdk.

Package sdkutil provides utilities used to call awssdk.

Package sdkutil provides utilities used to call awssdk.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AwsConfig

func AwsConfig() (awsConfig *aws.Config)

AwsConfig returns the default aws.Config object while the appropriate credentials. Callers should override returned config properties with any values they want for service specific overrides.

func GetAwsErrorCode

func GetAwsErrorCode(err error) string

GetAwsErrorCode tries to return AwsError code

func HandleAwsError

func HandleAwsError(log log.T, err error, stopPolicy *StopPolicy)

HandleAwsError logs an AWS error.

Types

type StopPolicy

type StopPolicy struct {
	Name string

	MaximumErrorThreshold int
	SyncObject            *sync.Mutex
	// contains filtered or unexported fields
}

StopPolicy specifies the execution policy on data points like errors, duration

func NewStopPolicy

func NewStopPolicy(name string, errorThreshold int) *StopPolicy

NewStopPolicy creates an object of StopPolicy

func (*StopPolicy) AddErrorCount

func (s *StopPolicy) AddErrorCount(x int)

AddErrorCount increments the error count by the set amount

func (*StopPolicy) IsHealthy

func (s *StopPolicy) IsHealthy() (healthy bool)

IsHealthy returns true if the policy determines the handler is safe to call otherwise false.

func (*StopPolicy) ProcessException

func (s *StopPolicy) ProcessException(err error)

ProcessException sets provides a default implementation when errors occur

func (*StopPolicy) ResetErrorCount

func (s *StopPolicy) ResetErrorCount()

ResetErrorCount resets the error count, typically on successful operation

func (*StopPolicy) String

func (s *StopPolicy) String() string

String returns the string representation of the stop policy

Directories

Path Synopsis
Package retryer overrides the default aws sdk retryer delay logic to better suit the mds needs
Package retryer overrides the default aws sdk retryer delay logic to better suit the mds needs

Jump to

Keyboard shortcuts

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