Documentation
¶
Index ¶
- Variables
- func NewSQSChan(ctx *dsl.Ctx, o interface{}) (dsl.Chan, error)
- type SQSChan
- func (c *SQSChan) Close(ctx *dsl.Ctx) error
- func (c *SQSChan) Consume(ctx *dsl.Ctx)
- func (c *SQSChan) DocSpec() *dsl.DocSpec
- func (c *SQSChan) Kill(ctx *dsl.Ctx) error
- func (c *SQSChan) Kind() dsl.ChanKind
- func (c *SQSChan) Open(ctx *dsl.Ctx) error
- func (c *SQSChan) Pub(ctx *dsl.Ctx, m dsl.Msg) error
- func (c *SQSChan) Recv(ctx *dsl.Ctx) chan dsl.Msg
- func (c *SQSChan) Sub(ctx *dsl.Ctx, topic string) error
- func (c *SQSChan) To(ctx *dsl.Ctx, m dsl.Msg) error
- type SQSOpts
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // DefaultChanBufferSize is the default buffer size for // underlying Go channels used by some Chans. DefaultChanBufferSize = 1024 )
Functions ¶
Types ¶
type SQSChan ¶
type SQSChan struct {
// contains filtered or unexported fields
}
SQSChan is an SQS consumer/producer.
In this implementation, message and subscription topics are ignored.
type SQSOpts ¶
type SQSOpts struct {
// Endpoint is optional AWS service endpoint, which can be
// provided to point to a non-standard endpoint (like a local
// implementation).
Endpoint string `json:"Endpoint"` // Will eventually move to all lower-case.
// QueueURL is the target SQS queue URL.
QueueURL string
// DelaySeconds is the publishing delay in seconds.
//
// Defaults to zero.
DelaySeconds int64
// VisibilityTimeout is the default timeout for a message
// reappearing after a receive operation and before a delete
// operation. Defaults to 10 seconds.
VisibilityTimeout int64
// MaxMessages is the maximum number of message to request.
//
// Defaults to 1.
MaxMessages int
// DoNotDelete turns off automatic message deletion upon receipt.
DoNotDelete bool
// BufferSize is the size of the underlying channel buffer.
// Defaults to DefaultChanBufferSize.
BufferSize int
// MsgDelaySeconds enables extraction of property DelaySeconds
// from published message's payload, which should be a JSON of
// an map.
//
// This hack means that a test cannot specify DelaySeconds for
// a payload that is not a JSON representation of a map.
// ToDo: Reconsider.
MsgDelaySeconds bool
// WaitTimeSeconds is the SQS receive wait time.
//
// Defaults to one second.
WaitTimeSeconds int64
}
SQSOpts configures an SQS consumer/producer.
For now, the target queue URL is provided when the channel is created. Eventually perhaps the queue URL could be the message/subscription topic.
Click to show internal directories.
Click to hide internal directories.