Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HttpPusher ¶
type HttpPusher struct {
// contains filtered or unexported fields
}
func NewHttpPusher ¶
func NewHttpPusher(serverAddr, callbackAddr string) *HttpPusher
callbackAddr 服务器地址,callbackAddr 回调地址 同时会监听回调地址以实现Listener功能
func (*HttpPusher) Add ¶
func (p *HttpPusher) Add(topic string, timeout int64, data []byte) (err error)
func (*HttpPusher) DeleteThenAdd ¶
func (p *HttpPusher) DeleteThenAdd(topic string, timeout int64, data []byte) (err error)
type HttpReceiver ¶
type HttpReceiver struct {
// contains filtered or unexported fields
}
func NewHttpReceiver ¶
func NewHttpReceiver(listenAddr string) *HttpReceiver
在startServer后会监听listenAddr地址
func (*HttpReceiver) AddListener ¶
func (p *HttpReceiver) AddListener(topic string, listener Listener)
func (*HttpReceiver) HandleRequest ¶
func (p *HttpReceiver) HandleRequest(req *http.Request) (response string)
处理来自的async-runner的http回调请求 最后直接响应response就行了
Click to show internal directories.
Click to hide internal directories.