Documentation
¶
Index ¶
- Constants
- Variables
- type QueueAttributes
- type SQSClient
- type SQSClientMock
- func (m *SQSClientMock) ChangeMessageVisibilityWithContext(ctx aws.Context, input *sqs.ChangeMessageVisibilityInput, ...) (*sqs.ChangeMessageVisibilityOutput, error)
- func (m *SQSClientMock) CreateQueueWithContext(ctx aws.Context, input *sqs.CreateQueueInput, opts ...request.Option) (*sqs.CreateQueueOutput, error)
- func (m *SQSClientMock) DeleteMessageWithContext(ctx aws.Context, input *sqs.DeleteMessageInput, opts ...request.Option) (*sqs.DeleteMessageOutput, error)
- func (m *SQSClientMock) GetQueueAttributesWithContext(ctx aws.Context, input *sqs.GetQueueAttributesInput, opts ...request.Option) (*sqs.GetQueueAttributesOutput, error)
- func (m *SQSClientMock) GetQueueUrlWithContext(ctx aws.Context, input *sqs.GetQueueUrlInput, opts ...request.Option) (*sqs.GetQueueUrlOutput, error)
- func (m *SQSClientMock) ReceiveMessageWithContext(ctx aws.Context, input *sqs.ReceiveMessageInput, opts ...request.Option) (*sqs.ReceiveMessageOutput, error)
- func (m *SQSClientMock) SendMessageBatchWithContext(ctx aws.Context, input *sqs.SendMessageBatchInput, opts ...request.Option) (*sqs.SendMessageBatchOutput, error)
- func (m *SQSClientMock) SendMessageWithContext(ctx aws.Context, input *sqs.SendMessageInput, opts ...request.Option) (*sqs.SendMessageOutput, error)
- func (m *SQSClientMock) SetQueueAttributesWithContext(ctx aws.Context, input *sqs.SetQueueAttributesInput, opts ...request.Option) (*sqs.SetQueueAttributesOutput, error)
- type Subscription
Constants ¶
View Source
const ( MetadataKeyMessageId = "MessageId" MetadataKeyReceiptHandle = "ReceiptHandle" MetadataKeyMD5OfBody = "MD5OfBody" MetadataKeyMD5OfMessageAttributes = "MD5OfMessageAttributes" MetadataKeyMessageDeduplicationID = "MessageDeduplicationID" MetadataKeyMessageGroupID = "MessageGroupID" MetadataKeyMessageDelaySeconds = "MessageDelaySeconds" )
View Source
const ( QueueAttributeKeyFifoQueue = "FifoQueue" QueueAttributeKeyContentBasedDeduplication = "ContentBasedDeduplication" )
Variables ¶
View Source
var ErrCompletedSubscription = errors.New("subscription is unsubscribed")
Functions ¶
This section is empty.
Types ¶
type QueueAttributes ¶ added in v0.2.1
func (*QueueAttributes) IsContentBasedDeduplication ¶ added in v0.2.1
func (q *QueueAttributes) IsContentBasedDeduplication() bool
func (*QueueAttributes) IsFIFO ¶ added in v0.2.1
func (q *QueueAttributes) IsFIFO() bool
type SQSClient ¶ added in v0.2.1
type SQSClient interface { SendMessageWithContext(ctx aws.Context, input *sqs.SendMessageInput, opts ...request.Option) (*sqs.SendMessageOutput, error) SendMessageBatchWithContext(ctx aws.Context, input *sqs.SendMessageBatchInput, opts ...request.Option) (*sqs.SendMessageBatchOutput, error) ReceiveMessageWithContext(ctx aws.Context, input *sqs.ReceiveMessageInput, opts ...request.Option) (*sqs.ReceiveMessageOutput, error) DeleteMessageWithContext(ctx aws.Context, input *sqs.DeleteMessageInput, opts ...request.Option) (*sqs.DeleteMessageOutput, error) ChangeMessageVisibilityWithContext(ctx aws.Context, input *sqs.ChangeMessageVisibilityInput, opts ...request.Option) (*sqs.ChangeMessageVisibilityOutput, error) GetQueueUrlWithContext(ctx aws.Context, input *sqs.GetQueueUrlInput, opts ...request.Option) (*sqs.GetQueueUrlOutput, error) GetQueueAttributesWithContext(ctx aws.Context, input *sqs.GetQueueAttributesInput, opts ...request.Option) (*sqs.GetQueueAttributesOutput, error) CreateQueueWithContext(ctx aws.Context, input *sqs.CreateQueueInput, opts ...request.Option) (*sqs.CreateQueueOutput, error) SetQueueAttributesWithContext(ctx aws.Context, input *sqs.SetQueueAttributesInput, opts ...request.Option) (*sqs.SetQueueAttributesOutput, error) }
type SQSClientMock ¶ added in v0.2.1
type SQSClientMock struct { SendMessageWithContextFunc func(ctx aws.Context, input *sqs.SendMessageInput, opts ...request.Option) (*sqs.SendMessageOutput, error) SendMessageBatchWithContextFunc func(ctx aws.Context, input *sqs.SendMessageBatchInput, opts ...request.Option) (*sqs.SendMessageBatchOutput, error) ReceiveMessageWithContextFunc func(ctx aws.Context, input *sqs.ReceiveMessageInput, opts ...request.Option) (*sqs.ReceiveMessageOutput, error) DeleteMessageWithContextFunc func(ctx aws.Context, input *sqs.DeleteMessageInput, opts ...request.Option) (*sqs.DeleteMessageOutput, error) ChangeMessageVisibilityWithContextFunc func(ctx aws.Context, input *sqs.ChangeMessageVisibilityInput, opts ...request.Option) (*sqs.ChangeMessageVisibilityOutput, error) GetQueueUrlWithContextFunc func(ctx aws.Context, input *sqs.GetQueueUrlInput, opts ...request.Option) (*sqs.GetQueueUrlOutput, error) GetQueueAttributesWithContextFunc func(ctx aws.Context, input *sqs.GetQueueAttributesInput, opts ...request.Option) (*sqs.GetQueueAttributesOutput, error) CreateQueueWithContextFunc func(ctx aws.Context, input *sqs.CreateQueueInput, opts ...request.Option) (*sqs.CreateQueueOutput, error) SetQueueAttributesWithContextFunc func(ctx aws.Context, input *sqs.SetQueueAttributesInput, opts ...request.Option) (*sqs.SetQueueAttributesOutput, error) }
func (*SQSClientMock) ChangeMessageVisibilityWithContext ¶ added in v0.2.1
func (m *SQSClientMock) ChangeMessageVisibilityWithContext(ctx aws.Context, input *sqs.ChangeMessageVisibilityInput, opts ...request.Option) (*sqs.ChangeMessageVisibilityOutput, error)
func (*SQSClientMock) CreateQueueWithContext ¶ added in v0.2.1
func (m *SQSClientMock) CreateQueueWithContext(ctx aws.Context, input *sqs.CreateQueueInput, opts ...request.Option) (*sqs.CreateQueueOutput, error)
func (*SQSClientMock) DeleteMessageWithContext ¶ added in v0.2.1
func (m *SQSClientMock) DeleteMessageWithContext(ctx aws.Context, input *sqs.DeleteMessageInput, opts ...request.Option) (*sqs.DeleteMessageOutput, error)
func (*SQSClientMock) GetQueueAttributesWithContext ¶ added in v0.2.1
func (m *SQSClientMock) GetQueueAttributesWithContext(ctx aws.Context, input *sqs.GetQueueAttributesInput, opts ...request.Option) (*sqs.GetQueueAttributesOutput, error)
func (*SQSClientMock) GetQueueUrlWithContext ¶ added in v0.2.1
func (m *SQSClientMock) GetQueueUrlWithContext(ctx aws.Context, input *sqs.GetQueueUrlInput, opts ...request.Option) (*sqs.GetQueueUrlOutput, error)
func (*SQSClientMock) ReceiveMessageWithContext ¶ added in v0.2.1
func (m *SQSClientMock) ReceiveMessageWithContext(ctx aws.Context, input *sqs.ReceiveMessageInput, opts ...request.Option) (*sqs.ReceiveMessageOutput, error)
func (*SQSClientMock) SendMessageBatchWithContext ¶ added in v0.2.1
func (m *SQSClientMock) SendMessageBatchWithContext(ctx aws.Context, input *sqs.SendMessageBatchInput, opts ...request.Option) (*sqs.SendMessageBatchOutput, error)
func (*SQSClientMock) SendMessageWithContext ¶ added in v0.2.1
func (m *SQSClientMock) SendMessageWithContext(ctx aws.Context, input *sqs.SendMessageInput, opts ...request.Option) (*sqs.SendMessageOutput, error)
func (*SQSClientMock) SetQueueAttributesWithContext ¶ added in v0.2.1
func (m *SQSClientMock) SetQueueAttributesWithContext(ctx aws.Context, input *sqs.SetQueueAttributesInput, opts ...request.Option) (*sqs.SetQueueAttributesOutput, error)
type Subscription ¶
type Subscription struct {
// contains filtered or unexported fields
}
func NewSubscription ¶
func NewSubscription(queueAttributes *QueueAttributes, svc SQSClient, conn jobworker.Connector, meta map[string]string) *Subscription
func (*Subscription) Active ¶
func (s *Subscription) Active() bool
func (*Subscription) Queue ¶
func (s *Subscription) Queue() chan *jobworker.Job
func (*Subscription) Start ¶ added in v0.2.1
func (s *Subscription) Start()
func (*Subscription) UnSubscribe ¶
func (s *Subscription) UnSubscribe() error
Click to show internal directories.
Click to hide internal directories.