sqs

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 25, 2018 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package sqs provides a Vice implementation for Amazon Simple Queue Service.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegionFromURL

func RegionFromURL(url string) string

RegionFromURL parses an sqs url and returns the aws region

Types

type MultiTransport added in v1.0.0

type MultiTransport struct {
	NewService func(region string) (sqsiface.SQSAPI, error)
	// contains filtered or unexported fields
}

MultiTransport is a vice.Transport for Amazon's SQS

func NewMulti added in v1.0.0

func NewMulti(writers, batchSize int, batchInterval time.Duration) *MultiTransport

NewMulti returns a new transport with multiple sqs writers Credentials are automatically sourced using the AWS SDK credential chain, for more info see the AWS SDK docs: https://godoc.org/github.com/aws/aws-sdk-go#hdr-Configuring_Credentials

func (*MultiTransport) Done added in v1.0.0

func (t *MultiTransport) Done() chan struct{}

Done gets a channel which is closed when the transport has successfully stopped.

func (*MultiTransport) ErrChan added in v1.0.0

func (t *MultiTransport) ErrChan() <-chan error

ErrChan gets the channel on which errors are sent.

func (*MultiTransport) Receive added in v1.0.0

func (t *MultiTransport) Receive(name string) <-chan []byte

Receive gets a channel on which to receive messages with the specified name. The name is the queue's url

func (*MultiTransport) Send added in v1.0.0

func (t *MultiTransport) Send(name string) chan<- []byte

Send gets a channel on which messages with the specified name may be sent. The name is the queue's URL

func (*MultiTransport) Stop added in v1.0.0

func (t *MultiTransport) Stop()

Stop stops the transport. The channel returned from Done() will be closed when the transport has stopped.

type Transport

type Transport struct {
	NewService func(region string) (sqsiface.SQSAPI, error)
	// contains filtered or unexported fields
}

Transport is a vice.Transport for Amazon's SQS

func New

func New(batchSize int, batchInterval time.Duration) *Transport

New returns a new transport Credentials are automatically sourced using the AWS SDK credential chain, for more info see the AWS SDK docs: https://godoc.org/github.com/aws/aws-sdk-go#hdr-Configuring_Credentials

func (*Transport) Done

func (t *Transport) Done() chan struct{}

Done gets a channel which is closed when the transport has successfully stopped.

func (*Transport) ErrChan

func (t *Transport) ErrChan() <-chan error

ErrChan gets the channel on which errors are sent.

func (*Transport) Receive

func (t *Transport) Receive(name string) <-chan []byte

Receive gets a channel on which to receive messages with the specified name. The name is the queue's url

func (*Transport) Send

func (t *Transport) Send(name string) chan<- []byte

Send gets a channel on which messages with the specified name may be sent. The name is the queue's URL

func (*Transport) Stop

func (t *Transport) Stop()

Stop stops the transport. The channel returned from Done() will be closed when the transport has stopped.

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL