sqs

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// TransportName is the name of this transport.
	TransportName = "AWS SNS"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(*Transport) error

Option is the function signature required to be considered an nats.Option.

func WithEncoding

func WithEncoding(encoding encoding.Encoding) Option

WithEncoding sets the encoding for NATS transport.

type Transport

type Transport struct {
	Encoding encoding.Encoding
	Client   *_sqs.SQS
	QueueURL string

	Receiver transport.Receiver
	// Converter is invoked if the incoming transport receives an undecodable
	// message.
	Converter transport.Converter
	// contains filtered or unexported fields
}

Transport acts as both a http client and a http handler.

func New

func New(queueURL string, opts ...Option) (*Transport, error)

New creates a new NATS transport.

func (*Transport) HasConverter

func (t *Transport) HasConverter() bool

HasConverter implements Transport.HasConverter

func (*Transport) HasTracePropagation

func (t *Transport) HasTracePropagation() bool

HasTracePropagation implements Transport.HasTracePropagation

func (*Transport) Send

Send implements Transport.Send

func (*Transport) SetConverter

func (t *Transport) SetConverter(c transport.Converter)

SetConverter implements Transport.SetConverter

func (*Transport) SetReceiver

func (t *Transport) SetReceiver(r transport.Receiver)

SetReceiver implements Transport.SetReceiver

func (*Transport) StartReceiver

func (t *Transport) StartReceiver(ctx context.Context) (err error)

StartReceiver implements Transport.StartReceiver NOTE: This is a blocking call.

Jump to

Keyboard shortcuts

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