Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LambdaMetaData ¶
type LambdaMetaData struct { FunctionName string FunctionVersion string LogGroupName string LogStreamName string MemoryLimitInMB int Context *lambdacontext.LambdaContext }
LambdaMetaData stored details about the current lambda context.
func GetLambdaMetaData ¶
func GetLambdaMetaData(ctx context.Context) LambdaMetaData
GetLambdaMetaData returns MetaData extracted from the current lambda context.
type SNSLock ¶
type SNSLock struct { Region string `json:"region"` Table string `json:"table"` TTL int64 `json:"ttl"` RetryWait int64 `json:"retry-wait"` // contains filtered or unexported fields }
SNSLock manages locking of sns messages using dynamodb. The SNS messages are locked using the hash of their message contents and the lock expires after the TTL (seconds) has expired.
RetryWait (milliseconds) is used to manage retry backoff times.
func NewSNSLock ¶
NewSNSLock returns a new sns lock instance to manage dynamodb locking
func NewSNSLockFromJson ¶
NewSNSLockFromJson returns a new sns lock instance to manage dynamodb locking
func (*SNSLock) Available ¶
Available returns true if the snsEvent is available for use (not locked) and it returns false if it is locked.
Locked is defined as the record being in the configured dynamodb table and not expires.
func (*SNSLock) AvailableById ¶
AvailableById returns true if the given id is available for use (not locked) and it returns false if it is locked.
Locked is defined as the record being in the configured dynamodb table and not expires.