Documentation ¶
Index ¶
Constants ¶
View Source
const (
MessageAttributeReqID string = "x_req_id"
)
Variables ¶
This section is empty.
Functions ¶
func GetUniqueName ¶
func GetUniqueName() string
Types ¶
type Config ¶
type Config struct { Prefix string `split_words:"true" required:"true"` TopicArns []string `split_words:"true" required:"true"` MaxNumberOfMessages int64 `split_words:"true" default:"10"` WaitTimeSecond int64 `split_words:"true" default:"20"` VisibilityTimeout int64 `split_words:"true" default:"3600"` DeliveryDelay int64 `split_words:"true" default:"0"` MessageRetentionPeriod int64 `split_words:"true" default:"3600"` HandlerTimeout int64 `split_words:"true" default:"60"` }
type HandlerFunc ¶
HandlerFunc is used to define the Handler that is run on for each message
func (HandlerFunc) HandleMessage ¶
func (f HandlerFunc) HandleMessage(ctx context.Context, msg *M) error
HandleMessage wraps a function for handling sqs messages
type InstanceQ ¶
type InstanceQ struct {
// contains filtered or unexported fields
}
func NewInstanceQ ¶
type M ¶
type M struct { Notification NotificationMessage ReceiptHandle string Body map[string]interface{} ID string RawBody []byte }
type MessageAttribute ¶
type NotificationMessage ¶
type NotificationMessage struct { Type string `json:"Type"` ID string `json:"MessageId"` TopicArn string `json:"TopicArn"` Body string `json:"Message"` Timestamp time.Time `json:"Timestamp"` SignatureVersion string `json:"SignatureVersion"` Signature string `json:"Signature"` SigningCertURL string `json:"SigningCertURL"` UnsubscribeURL string `json:"UnsubscribeURL"` Attributes map[string]MessageAttribute `json:"Attributes"` }
Click to show internal directories.
Click to hide internal directories.