aliyungo: github.com/denverdino/aliyungo/mq Index | Files

package mq

import "github.com/denverdino/aliyungo/mq"

Index

Package Files

client.go types.go util.go

func GetCurrentMillisecond Uses

func GetCurrentMillisecond() int64

获取当前时间戳(毫秒)

func GetCurrentUnixMicro Uses

func GetCurrentUnixMicro() int64

获取当前时间戳(秒)

func HamSha1 Uses

func HamSha1(data string, key []byte) string

func HttpDelete Uses

func HttpDelete(urlStr string, header map[string]string) ([]byte, int, error)

GET请求

func HttpGet Uses

func HttpGet(urlStr string, header map[string]string) ([]byte, int, error)

GET请求

func Md5 Uses

func Md5(byteMessage []byte) string

对数据进行md5计算

func Sha1 Uses

func Sha1(data string) string

对字符串进行sha1 计算

type Client Uses

type Client struct {
    AccessKey  string
    SecretKey  string
    Endpoint   string
    Topic      string
    ProducerId string
    ConsumerId string
    Key        string
    Tag        string
}

func NewClient Uses

func NewClient(ak string, sk string, endpoint string, topic string,
    producerId string, consumerId string, key string, tag string) (client *Client)

func (*Client) ReceiveMessage Uses

func (client *Client) ReceiveMessage(messageChan chan string, errChan chan error)

func (*Client) Send Uses

func (client *Client) Send(time int64, message []byte) (msgId string, err error)

type Message Uses

type Message struct {
    Body           string `json:"body"`
    BornTime       string `json:"bornTime"`
    Key            string `json:"key"`
    MsgHandle      string `json:"msgHandle"`
    MsgId          string `json:"msgId"`
    ReconsumeTimes int    `json:"reconsumeTimes"`
    Tag            string `json:"tag"`
}

type MessageResponse Uses

type MessageResponse struct {
    Body     string `json:"body"`
    BornTime int64  `json:"bornTime"` // UTC time in Unix
}

type Messages Uses

type Messages struct {
    Topic      string
    Tag        string
    ConsumerId string
    Time       int64
}

type SendMessage Uses

type SendMessage struct {
    Topic      string
    Tag        string
    ProducerId string
    Key        string
    Body       string
    Time       int64
}

Package mq imports 15 packages (graph) and is imported by 1 packages. Updated 2018-03-14. Refresh now. Tools for package owners.