Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Connection ¶
type Connection interface { // Run is a task which maintains and closes connection Run(publishCh <-chan interface{}) parallel.Task // Subscribe returns task subscribing to the type-specific topic, receiving messages from there and distributing them between receiving channels Subscribe(ctx context.Context, templatePtr Entity, recvChs []chan<- interface{}) parallel.Task }
Connection is an interface of event broker client
func NewNATSConnection ¶
func NewNATSConnection(config infra.Config, dispatcherF DispatcherFactory) Connection
NewNATSConnection creates new NATS connection
type Dispatcher ¶
Dispatcher decodes, validates and sends message to local shard
type DispatcherFactory ¶
type DispatcherFactory interface {
Create(templatePtr Entity, recvChs []chan<- interface{}, log *zap.Logger) Dispatcher
}
DispatcherFactory creates dispatchers
func NewDispatcherFactory ¶
func NewDispatcherFactory(config infra.Config, shardIDGen sharding.IDGenerator) DispatcherFactory
NewDispatcherFactory creates new dispatcher factory
Click to show internal directories.
Click to hide internal directories.