Documentation ¶
Index ¶
- func Commands() []internal.Command
- func WithName(name string) func(channel *Channel)
- func WithPattern(pattern string) func(channel *Channel)
- type Channel
- func (ch *Channel) IsActive() bool
- func (ch *Channel) Name() string
- func (ch *Channel) NumSubs() int
- func (ch *Channel) Pattern() glob.Glob
- func (ch *Channel) Publish(message string)
- func (ch *Channel) Start()
- func (ch *Channel) Subscribe(conn *net.Conn) bool
- func (ch *Channel) Subscribers() map[*net.Conn]*resp.Conn
- func (ch *Channel) Unsubscribe(conn *net.Conn) bool
- type PubSub
- func (ps *PubSub) Channels(pattern string) []byte
- func (ps *PubSub) GetAllChannels() []*Channel
- func (ps *PubSub) NumPat() int
- func (ps *PubSub) NumSub(channels []string) []byte
- func (ps *PubSub) Publish(_ context.Context, message string, channelName string)
- func (ps *PubSub) Subscribe(_ context.Context, conn *net.Conn, channels []string, withPattern bool)
- func (ps *PubSub) Unsubscribe(_ context.Context, conn *net.Conn, channels []string, withPattern bool) []byte
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithPattern ¶
WithPattern option sets the compiled glob pattern for the channel if it's a pattern channel.
Types ¶
Click to show internal directories.
Click to hide internal directories.