Versions in this module Expand all Collapse all v1 v1.0.0 May 25, 2023 Changes in this version + const HmacSHA1 + const HmacSHA256 + var ErrInvalidParameter = errors.New("invalid parameter") + var InsecureSkipVerify bool + var MaxDelaySeconds = 70 * 24 * 60 * 60 + var MaxHandleCount = 16 + var MaxHandleLength = 256 + var MaxMessageCount = 16 + var MaxMessageSize = 1 * 1024 * 1024 + var MaxQueueNameSize = 64 + var MaxRouteKeyDots = 15 + var MaxRouteKeyLength = 64 + var MaxTagCount = 5 + var MaxTagLength = 16 + var MaxTopicNameSize = 64 + var MaxWaitSeconds = 30 + type Client struct + AppId uint64 + Debug bool + Header map[string]string + HttpClient *http.Client + Method string + SecretId string + SecretKey string + SignMethod string + Token string + Url *url.URL + func NewClient(uri, secretId, secretKey string, t time.Duration, keepalive ...bool) (c *Client, err error) + func (c *Client) BatchDeleteMessage(queue string, receiptHandles []string) (ResponseDMs, error) + func (c *Client) BatchPublishMessage(topic, routingKey string, messages, tags []string) (ResponseSMs, error) + func (c *Client) BatchReceiveMessage(queue string, pollingWaitSeconds, numOfMsg int) (ResponseRMs, error) + func (c *Client) BatchSendMessage(queue string, messages []string, delaySeconds int) (ResponseSMs, error) + func (c *Client) DeleteMessage(queue, receiptHandle string) (ResponseDM, error) + func (c *Client) PublishMessage(topic, message, routingKey string, tags []string) (ResponseSM, error) + func (c *Client) QueryQueueRoute(queue string) (Route, error) + func (c *Client) QueryTopicRoute(topic string) (Route, error) + func (c *Client) ReceiveMessage(queue string, pollingWaitSeconds int) (ResponseRM, error) + func (c *Client) SendMessage(queue, message string, delaySeconds int) (ResponseSM, error) + type Message interface + DequeueCount func() int64 + EnqueueTime func() int64 + FirstDequeueTime func() int64 + Handle func() string + MsgBody func() string + NextVisibleTime func() int64 + type Msg interface + MsgId func() string + type MsgError interface + Code func() int + Handle func() string + Message func() string + type Queue struct + Client *Client + DelaySeconds int + Name string + PollingWaitSeconds int + func (q *Queue) BatchDelete(handles ...string) (ResponseDMs, error) + func (q *Queue) BatchReceive(numOfMsg int) (ResponseRMs, error) + func (q *Queue) BatchSend(messages ...string) (ResponseSMs, error) + func (q *Queue) Delete(handle string) (ResponseDM, error) + func (q *Queue) Receive() (ResponseRM, error) + func (q *Queue) Send(message string) (ResponseSM, error) + type ResponseDM interface + type ResponseDMs interface + Errors func() []MsgError + type ResponseRM interface + type ResponseRMs interface + MsgInfos func() []Message + type ResponseSM interface + type ResponseSMs interface + MsgIDs func() []Msg + type Result interface + ClientId func() uint64 + Code func() int + Message func() string + RequestId func() string + StatusCode func() int + type Route interface + Addr func() []string + type Topic struct + Client *Client + Name string + RoutingKey string + Tags []string + func (t *Topic) BatchPublish(messages ...string) (ResponseSMs, error) + func (t *Topic) Publish(message string) (ResponseSM, error)