# Functions
NewAsyncConsumer 创建异步消费者.
NewAsyncProducer 创建异步生产者,无需再手动启动.
NewConsumer 创建一个消费者,需要手动Start.
No description provided by the author
NewHttpProducer 创建一个HTTP的生产者.
NewProducer 创建异步生产者,需手动启动.
# Constants
goland:noinspection GoUnusedGlobalVariable.
No description provided by the author
No description provided by the author
goland:noinspection GoUnusedGlobalVariable.
goland:noinspection GoUnusedGlobalVariable.
# Variables
goland:noinspection GoUnusedGlobalVariable.
goland:noinspection GoUnusedGlobalVariable.
goland:noinspection GoUnusedGlobalVariable.
goland:noinspection GoUnusedGlobalVariable.
goland:noinspection GoUnusedGlobalVariable.
goland:noinspection GoUnusedGlobalVariable.
goland:noinspection GoUnusedGlobalVariable.
goland:noinspection GoUnusedGlobalVariable.
# Structs
Broker Broker连接管理,负责连接服务器并完成注册任务 在检测到连接断开时主动重连.
No description provided by the author
Config 生产者和消费者配置参数.
Consumer 消费者.
ConsumerMessage 用于SDK直接传递给消费者的单条数据消息 需要从 TransferFrame 中转换.
No description provided by the author
HttpProducer HTTP 方式生产者
# Usage:
p := NewHttpProducer("http://127.0.0.1:1234") p.SetToken("token")
resp, err := p.Send("topic", "key", []byte("value")) if err != nil { panic(err) }.
PHandler 默认实现.
Producer 生产者, 通过 Send 发送的消息并非会立即投递给服务端 而是会按照服务器下发的配置定时批量发送消息,通常为500ms.
ProducerForm 生产者消息投递表单, 不允许将多个消息编码成一个消息帧; token若为空则认为不加密; value是对加密后的消息体进行base64编码后的结果,依据token判断是否需要解密.
ProducerMessage 生产者直接发送的数据 会转换成 TransferFrame 后发送.
ProductResponse 消息返回值; 仅当 status=Accepted 时才认为服务器接受了请求并正确的处理了消息.
No description provided by the author
# Interfaces
No description provided by the author
No description provided by the author
No description provided by the author
# Type aliases
No description provided by the author