PSubscribe subscribes the client to the given patterns. Patterns can be omitted to create empty subscription.
(ctx context.Context, channels ...string)
| 728 | // PSubscribe subscribes the client to the given patterns. |
| 729 | // Patterns can be omitted to create empty subscription. |
| 730 | func (c *SentinelClient) PSubscribe(ctx context.Context, channels ...string) *PubSub { |
| 731 | pubsub := c.pubSub() |
| 732 | if len(channels) > 0 { |
| 733 | _ = pubsub.PSubscribe(ctx, channels...) |
| 734 | } |
| 735 | return pubsub |
| 736 | } |
| 737 | |
| 738 | func (c *SentinelClient) GetMasterAddrByName(ctx context.Context, name string) *StringSliceCmd { |
| 739 | cmd := NewStringSliceCmd(ctx, "sentinel", "get-master-addr-by-name", name) |
nothing calls this directly
no test coverage detected