Documentation ¶
Index ¶
- type Message
- type Queue
- func (q *Queue) AddDeleteList(msg interface{})
- func (q *Queue) AddMessage(message string)
- func (q *Queue) AddMessageJSONMarshal(message interface{}) error
- func (q *Queue) AddMessageMap(message map[string]interface{}) error
- func (q *Queue) AutoDelete(b bool)
- func (q *Queue) ChangeMessageVisibility(msg *Message, timeoutInSeconds int) error
- func (q *Queue) CountMessage() (visible int, invisible int, err error)
- func (q *Queue) DeleteListItems() error
- func (q *Queue) DeleteMessage(msg *Message) error
- func (q *Queue) Fetch(num int) ([]*Message, error)
- func (q *Queue) FetchBody(num int) []string
- func (q *Queue) FetchBodyOne() string
- func (q *Queue) FetchOne() (*Message, error)
- func (q *Queue) Purge() error
- func (q *Queue) Send() error
- func (q *Queue) SetExpire(sec int)
- type SQS
- func (svc *SQS) CreateQueue(in *SDK.CreateQueueInput) error
- func (svc *SQS) CreateQueueWithName(name string) error
- func (svc *SQS) DeleteQueue(name string) error
- func (svc *SQS) Errorf(format string, v ...interface{})
- func (svc *SQS) GetQueue(name string) (*Queue, error)
- func (svc *SQS) Infof(format string, v ...interface{})
- func (svc *SQS) IsExistQueue(name string) (bool, error)
- func (svc *SQS) SetLogger(logger log.Logger)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Message ¶ added in v0.9.2
type Message struct {
// contains filtered or unexported fields
}
Message is SQS Message wrapper struct.
func NewMessage ¶ added in v0.9.2
NewMessage returns initialized *Message.
func (*Message) GetMessageID ¶ added in v0.9.2
GetMessageID returns pointer of message id.
func (*Message) GetReceiptHandle ¶ added in v0.9.2
GetReceiptHandle returns pointer of ReceiptHandle.
type Queue ¶
type Queue struct {
// contains filtered or unexported fields
}
Queue is SQS Queue wrapper struct.
func (*Queue) AddDeleteList ¶
func (q *Queue) AddDeleteList(msg interface{})
AddDeleteList adds a message to the delete spool.
func (*Queue) AddMessage ¶
AddMessage adds message to the send spool.
func (*Queue) AddMessageJSONMarshal ¶ added in v1.0.0
AddMessageJSONMarshal adds message to the send pool with encoding json data.
func (*Queue) AddMessageMap ¶
AddMessageMap adds message to the send pool from map data.
func (*Queue) ChangeMessageVisibility ¶ added in v1.0.3
ChangeMessageVisibility sends the request to AWS api to change visibility of the message.
func (*Queue) CountMessage ¶
CountMessage sends request to AWS api to counts left messages in the Queue.
func (*Queue) DeleteListItems ¶
DeleteListItems executes delete operation in the delete spool.
func (*Queue) DeleteMessage ¶
DeleteMessage sends the request to AWS api to delete the message.
func (*Queue) FetchBody ¶
FetchBody fetches only the body of messages. ** cannot handle deletion manually as lack of MessageId and ReceiptHandle **
func (*Queue) FetchBodyOne ¶
FetchBodyOne fetches the body of a single message. ** cannot handle deletion manually as lack of MessageId and ReceiptHandle **
type SQS ¶ added in v1.0.0
type SQS struct {
// contains filtered or unexported fields
}
SQS has SQS client and Queue list.
func (*SQS) CreateQueue ¶ added in v1.0.0
func (svc *SQS) CreateQueue(in *SDK.CreateQueueInput) error
CreateQueue creates new SQS Queue.
func (*SQS) CreateQueueWithName ¶ added in v1.0.0
CreateQueueWithName creates new SQS Queue by given name
func (*SQS) DeleteQueue ¶ added in v1.0.0
DeleteQueue detes the SQS Queue.
func (*SQS) IsExistQueue ¶ added in v1.0.0
IsExistQueue checks if the Queue already exists or not.