Subscribe 调用notice订阅消息
(id int64, host string)
| 26 | |
| 27 | //Subscribe 调用notice订阅消息 |
| 28 | func (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取消订阅消息 |
| 40 | func (n *Notice) UnSubscribe(id int64, host string) error { |