Documentation
¶
Index ¶
- type NATSBroker
- func (n *NATSBroker) Close() error
- func (n *NATSBroker) Connect(url string) error
- func (n *NATSBroker) IsConnected() bool
- func (n *NATSBroker) Publish(topic string, message []byte) error
- func (n *NATSBroker) Subscribe(topic string, handler func(message []byte)) error
- func (n *NATSBroker) Unsubscribe(topic string) error
- type PubSubBroker
- type RedisBroker
- func (r *RedisBroker) Close() error
- func (r *RedisBroker) Connect(url string) error
- func (r *RedisBroker) IsConnected() bool
- func (r *RedisBroker) Publish(topic string, message []byte) error
- func (r *RedisBroker) Subscribe(topic string, handler func(message []byte)) error
- func (r *RedisBroker) Unsubscribe(topic string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NATSBroker ¶
type NATSBroker struct {
// contains filtered or unexported fields
}
func InitNATSBroker ¶
func InitNATSBroker() *NATSBroker
func (*NATSBroker) Close ¶
func (n *NATSBroker) Close() error
func (*NATSBroker) Connect ¶
func (n *NATSBroker) Connect(url string) error
func (*NATSBroker) IsConnected ¶
func (n *NATSBroker) IsConnected() bool
func (*NATSBroker) Subscribe ¶
func (n *NATSBroker) Subscribe(topic string, handler func(message []byte)) error
func (*NATSBroker) Unsubscribe ¶
func (n *NATSBroker) Unsubscribe(topic string) error
type PubSubBroker ¶
type RedisBroker ¶
type RedisBroker struct {
// contains filtered or unexported fields
}
func InitRedisBroker ¶
func InitRedisBroker() *RedisBroker
func (*RedisBroker) Close ¶
func (r *RedisBroker) Close() error
func (*RedisBroker) Connect ¶
func (r *RedisBroker) Connect(url string) error
func (*RedisBroker) IsConnected ¶
func (r *RedisBroker) IsConnected() bool
func (*RedisBroker) Subscribe ¶
func (r *RedisBroker) Subscribe(topic string, handler func(message []byte)) error
func (*RedisBroker) Unsubscribe ¶
func (r *RedisBroker) Unsubscribe(topic string) error
Click to show internal directories.
Click to hide internal directories.