Documentation ¶
Index ¶
- Variables
- func IsValidPublishName(channel string) bool
- func IsValidSubscriptionName(channel string) bool
- type Subscription
- func (s *Subscription) AuthToken() string
- func (s *Subscription) MsgChannel() chan *message.Message
- func (s *Subscription) Name() string
- func (s *Subscription) OnMessage(onMessage func(channel string, msg message.Data)) error
- func (s *Subscription) StartMessageLoop(inMsg *message.Message, callback func(channel string, msg message.Data)) error
- func (s *Subscription) Unsubscribe() error
- type Unsubscriber
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidChannelName = errors.New("invalid channel channel")
Functions ¶
func IsValidSubscriptionName ¶
Types ¶
type Subscription ¶
type Subscription struct {
// contains filtered or unexported fields
}
func NewSubscription ¶
func NewSubscription(chanel string, unsub Unsubscriber, authToken string, msgCh chan *message.Message) (*Subscription, error)
todo error
func (*Subscription) AuthToken ¶ added in v0.0.3
func (s *Subscription) AuthToken() string
func (*Subscription) MsgChannel ¶
func (s *Subscription) MsgChannel() chan *message.Message
func (*Subscription) Name ¶
func (s *Subscription) Name() string
func (*Subscription) OnMessage ¶
func (s *Subscription) OnMessage(onMessage func(channel string, msg message.Data)) error
func (*Subscription) StartMessageLoop ¶ added in v0.0.4
type Unsubscriber ¶
type Unsubscriber func(subscription *Subscription) error
Click to show internal directories.
Click to hide internal directories.