Publish posts the message to the channel.
(ctx context.Context, channel string, message interface{})
| 18 | |
| 19 | // Publish posts the message to the channel. |
| 20 | func (c cmdable) Publish(ctx context.Context, channel string, message interface{}) *IntCmd { |
| 21 | cmd := NewIntCmd(ctx, "publish", channel, message) |
| 22 | _ = c(ctx, cmd) |
| 23 | // Record PubSub message sent (if command succeeded) |
| 24 | if cmd.Err() == nil { |
| 25 | otel.RecordPubSubMessage(ctx, nil, "sent", channel, false) |
| 26 | } |
| 27 | return cmd |
| 28 | } |
| 29 | |
| 30 | func (c cmdable) SPublish(ctx context.Context, channel string, message interface{}) *IntCmd { |
| 31 | cmd := NewIntCmd(ctx, "spublish", channel, message) |
nothing calls this directly
no test coverage detected