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 ¶
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 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