Documentation ¶
Index ¶
- Variables
- func NewPublisher(sess *session.Session, topic string, opts ...PublisherOption) (pubsub.Publisher, error)
- func NewSubscriber(sess *session.Session, topic, subscriptionID string, opts ...SubscriberOption) (pubsub.Subscriber, error)
- func VerifyPermissions(sess *session.Session, log *logrus.Logger) error
- type PublisherOption
- type SubscriberOption
Constants ¶
This section is empty.
Variables ¶
var ErrAckDeadlineOutOfRange = errors.New("The visibility timeout value is out of range. Values can be 0 to 43200 seconds")
ErrAckDeadlineOutOfRange is returned whenever an invalid duration is passed to ExtendAckDeadline
var ErrMessageRetentionPeriodOutOfRange = errors.New("The message retention period value is out of range. Values can be 60 to 1209600 seconds")
ErrMessageRetentionPeriodOutOfRange is returned whenever an invalid duration is passed to changeMessageRetentionPeriod
var ErrVisibilityTimeoutOutOfRange = errors.New("The visibility timeout value is out of range. Values can be 0 to 43200 seconds")
ErrVisibilityTimeoutOutOfRange is returned whenever an invalid duration is passed to changeVisibilityTimeout
Functions ¶
func NewPublisher ¶
func NewPublisher(sess *session.Session, topic string, opts ...PublisherOption) (pubsub.Publisher, error)
NewPublisher creates a new AWS message broker that will publish messages to the given topic. TODO: info on permissions needed within the config to make this work
Topic names must be made up of only uppercase and lowercase ASCII letters, numbers, underscores, and hyphens, and must be between 1 and 247 characters long.
func NewSubscriber ¶
func NewSubscriber(sess *session.Session, topic, subscriptionID string, opts ...SubscriberOption) (pubsub.Subscriber, error)
NewSubscriber creates an AWS message broker that will subscribe to the given topic with at-least-once message delivery semantics for the given subscriptionID TODO: info on permissions needed within the config to make this work
Types ¶
type PublisherOption ¶ added in v0.4.0
type PublisherOption func(*publisher)
func PublishWithLogger ¶ added in v0.4.0
func PublishWithLogger(logger *logrus.Logger) PublisherOption
type SubscriberOption ¶ added in v0.4.0
type SubscriberOption func(*awsSubscriber)
func SubscribeWithLogger ¶ added in v0.4.0
func SubscribeWithLogger(logger *logrus.Logger) SubscriberOption