MCPcopy Create free account
hub / github.com/dearcode/candy / UnSubscribe

Method UnSubscribe

util/notice.go:40–49  ·  view source on GitHub ↗

UnSubscribe 调用notice取消订阅消息

(id int64, host string)

Source from the content-addressed store, hash-verified

38
39//UnSubscribe 调用notice取消订阅消息
40func (n *Notice) UnSubscribe(id int64, host string) error {
41 req := &meta.UnSubscribeRequest{ID: id, Host: host}
42 resp, err := n.client.UnSubscribe(context.Background(), req)
43 if err != nil {
44 return errors.Trace(err)
45 }
46
47 log.Debugf("resp:%v", resp)
48 return errors.Trace(resp.Header.Error())
49}
50
51//Push 调用notice发推送消息
52func (n *Notice) Push(msg meta.PushMessage, ids ...*meta.PushID) error {

Callers

nothing calls this directly

Calls 2

UnSubscribeMethod · 0.65
ErrorMethod · 0.45

Tested by

no test coverage detected