Documentation
¶
Index ¶
- Variables
- func Drivers() []string
- func Register(name string, driver driver.Driver)
- type Conn
- func (c *Conn) Close() error
- func (c *Conn) Driver() string
- func (c *Conn) Publish(ctx context.Context, topic string, data []byte) error
- func (c *Conn) Subscribe(topic string, h func(*Message)) (*Subscription, error)
- func (c *Conn) SubscribeChan(topic string, queue chan *Message) (*Subscription, error)
- func (c *Conn) SubscribeSync(topic string) (*Subscription, error)
- type Message
- type Subscription
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrConnectionClosed = errors.New("goms: connection closed") ErrSyncSubRequired = errors.New("goms: illegal call on an async subscription") )
Errors.
Functions ¶
Types ¶
type Conn ¶
type Conn struct {
// contains filtered or unexported fields
}
func (*Conn) Subscribe ¶
func (c *Conn) Subscribe(topic string, h func(*Message)) (*Subscription, error)
func (*Conn) SubscribeChan ¶
func (c *Conn) SubscribeChan(topic string, queue chan *Message) (*Subscription, error)
func (*Conn) SubscribeSync ¶
func (c *Conn) SubscribeSync(topic string) (*Subscription, error)
type Subscription ¶
type Subscription struct {
// contains filtered or unexported fields
}
func (*Subscription) Close ¶
func (s *Subscription) Close() error
Click to show internal directories.
Click to hide internal directories.