MCPcopy
hub / github.com/redis/go-redis / SPublish

Method SPublish

pubsub_commands.go:30–38  ·  view source on GitHub ↗
(ctx context.Context, channel string, message interface{})

Source from the content-addressed store, hash-verified

28}
29
30func (c cmdable) SPublish(ctx context.Context, channel string, message interface{}) *IntCmd {
31 cmd := NewIntCmd(ctx, "spublish", channel, message)
32 _ = c(ctx, cmd)
33 // Record PubSub message sent (if command succeeded)
34 if cmd.Err() == nil {
35 otel.RecordPubSubMessage(ctx, nil, "sent", channel, true)
36 }
37 return cmd
38}
39
40func (c cmdable) PubSubChannels(ctx context.Context, pattern string) *StringSliceCmd {
41 args := []interface{}{"pubsub", "channels"}

Callers

nothing calls this directly

Calls 3

RecordPubSubMessageFunction · 0.92
NewIntCmdFunction · 0.85
ErrMethod · 0.65

Tested by

no test coverage detected