Documentation
¶
Index ¶
- func BindAttributes(attributes map[string]interface{}) (map[string]*sns.MessageAttributeValue, error)
- type AWSPubSubAdapter
- func (ps *AWSPubSubAdapter) FetchValueFromRedis(redisKey string) (string, error)
- func (ps *AWSPubSubAdapter) PollMessages(queueURL string, handler func(message *sqs.Message) error) error
- func (ps *AWSPubSubAdapter) Publish(topicARN string, messageGroupId, messageDeduplicationId string, ...) error
- func (ps *AWSPubSubAdapter) SetCompressionEnabled(enabled bool)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BindAttributes ¶
func BindAttributes(attributes map[string]interface{}) (map[string]*sns.MessageAttributeValue, error)
Types ¶
type AWSPubSubAdapter ¶
type AWSPubSubAdapter struct {
// contains filtered or unexported fields
}
func NewAWSPubSubAdapter ¶
func NewAWSPubSubAdapter(region, accessKeyId, secretAccessKey, snsEndpoint, redisAddress, redisPassword string, redisDB, redisPoolSize, redisMinIdleConn int) (*AWSPubSubAdapter, error)
func (*AWSPubSubAdapter) FetchValueFromRedis ¶ added in v0.2.0
func (ps *AWSPubSubAdapter) FetchValueFromRedis(redisKey string) (string, error)
Expects the redis key (uuid), fetches the value from redis and returns it as string always. Since all values are stored as string in redis for now.
func (*AWSPubSubAdapter) PollMessages ¶
func (*AWSPubSubAdapter) Publish ¶
func (ps *AWSPubSubAdapter) Publish(topicARN string, messageGroupId, messageDeduplicationId string, message interface{}, messageAttributes map[string]interface{}) error
Publishes the message with the messageAttributes to the topicARN provided. source, contains and eventType are necessary keys in messageAttributes. Returns error if fails to publish message
When the SNS Topic is FIFO type, messageGroupId and messageDeduplicationId are required. - messageGroupId : SNS orders the messages in a message group into a sequence. - messageDeduplicationId : SNS uses this to determine whether to create a new message or to use an existing one.
func (*AWSPubSubAdapter) SetCompressionEnabled ¶ added in v0.3.1
func (ps *AWSPubSubAdapter) SetCompressionEnabled(enabled bool)
Click to show internal directories.
Click to hide internal directories.