MCPcopy Index your code
hub / github.com/dearcode/candy / Subscribe

Method Subscribe

util/notice.go:28–37  ·  view source on GitHub ↗

Subscribe 调用notice订阅消息

(id int64, host string)

Source from the content-addressed store, hash-verified

26
27//Subscribe 调用notice订阅消息
28func (n *Notice) Subscribe(id int64, host string) error {
29 req := &meta.SubscribeRequest{ID: id, Host: host}
30 resp, err := n.client.Subscribe(context.Background(), req)
31 if err != nil {
32 return errors.Trace(err)
33 }
34
35 log.Debugf("resp:%v", resp)
36 return errors.Trace(resp.Header.Error())
37}
38
39//UnSubscribe 调用notice取消订阅消息
40func (n *Notice) UnSubscribe(id int64, host string) error {

Callers

nothing calls this directly

Calls 2

SubscribeMethod · 0.65
ErrorMethod · 0.45

Tested by

no test coverage detected