(ctx context.Context)
| 59 | } |
| 60 | |
| 61 | func (ps *PubSub) handleInbound(ctx context.Context) { |
| 62 | for { |
| 63 | msg, err := ps.Sub.Next(ctx) |
| 64 | if err != nil { |
| 65 | close(ps.Inbound) |
| 66 | return |
| 67 | } |
| 68 | ps.Inbound <- &Message{ |
| 69 | SenderID: msg.GetFrom().String(), |
| 70 | Content: string(msg.GetData()), |
| 71 | msg: msg, |
| 72 | } |
| 73 | } |
| 74 | } |
| 75 | |
| 76 | func (ps *PubSub) handleOutbound(ctx context.Context) { |
| 77 | for msg := range ps.Outbound { |
no test coverage detected