Push 调用notice发推送消息
(msg meta.PushMessage, ids ...*meta.PushID)
| 50 | |
| 51 | //Push 调用notice发推送消息 |
| 52 | func (n *Notice) Push(msg meta.PushMessage, ids ...*meta.PushID) error { |
| 53 | req := &meta.PushRequest{ID: ids, Msg: &msg} |
| 54 | resp, err := n.client.Push(context.Background(), req) |
| 55 | if err != nil { |
| 56 | return errors.Trace(err) |
| 57 | } |
| 58 | |
| 59 | log.Debugf("resp:%v", resp) |
| 60 | return errors.Trace(resp.Header.Error()) |
| 61 | } |