Documentation ¶
Index ¶
- func ImplementsINatsBus(b INatsBus) bool
- type INatsBus
- type NATSListener
- type NatsBus
- func (b *NatsBus) Close()
- func (b *NatsBus) Connection() *nats.Conn
- func (b *NatsBus) Listen(topic string, facts chan []byte)
- func (b *NatsBus) Publish(topic string, data []byte)
- func (b *NatsBus) Request(topic string, data []byte, timeout time.Duration) []byte
- func (b *NatsBus) Respond(topic string, hopes chan *nats.Msg)
- type NatsEmitter
- type NatsResponder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ImplementsINatsBus ¶
Types ¶
type INatsBus ¶
type INatsBus interface { Close() Publish(topic string, data []byte) Listen(topic string, facts chan []byte) Respond(topic string, hopes chan *nats.Msg) Request(topic string, data []byte, timeout time.Duration) []byte }
func SingletonNatsBus ¶
func SingletonNatsBus(cfg config.INatsConfig) INatsBus
func TransientNatsBus ¶
func TransientNatsBus(cfg config.INatsConfig) INatsBus
type NATSListener ¶
type NATSListener struct { Handler infra.IFactHandler Topic string // contains filtered or unexported fields }
func NewNatsListener ¶
func NewNatsListener(natsBus INatsBus, topic string, handler infra.IFactHandler) *NATSListener
func (*NATSListener) Activate ¶
func (l *NATSListener) Activate()
type NatsBus ¶
type NatsBus struct {
// contains filtered or unexported fields
}
func (*NatsBus) Connection ¶
func (b *NatsBus) Connection() *nats.Conn
type NatsEmitter ¶
type NatsEmitter struct { Handler domain.IEventHandler Topic string // contains filtered or unexported fields }
func NewNatsEmitter ¶
func NewNatsEmitter(natsBus INatsBus, topic string, handler domain.IEventHandler) *NatsEmitter
func (*NatsEmitter) Activate ¶
func (e *NatsEmitter) Activate()
type NatsResponder ¶
type NatsResponder struct { Topic string // contains filtered or unexported fields }
func NewNatsResponder ¶
func NewNatsResponder(natsBus INatsBus, topic string, handler infra.IHopeHandler) *NatsResponder
func (*NatsResponder) Activate ¶
func (r *NatsResponder) Activate()
Source Files ¶
Click to show internal directories.
Click to hide internal directories.