Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MessageBus ¶
type RedisMessageBus ¶
type RedisMessageBus struct { PubSubConn *redis.PubSubConn Conn *redis.Conn }
func NewRedis ¶
func NewRedis(pscon *redis.PubSubConn, conn *redis.Conn) *RedisMessageBus
func (RedisMessageBus) Receive ¶
func (r RedisMessageBus) Receive() interface{}
func (RedisMessageBus) Subscribe ¶
func (r RedisMessageBus) Subscribe(evnt Event)
func (RedisMessageBus) Unsubscribe ¶
func (r RedisMessageBus) Unsubscribe(evnt Event)
type Router ¶
type Router map[Event][]SubscribeFunc
func (Router) Subscribe ¶
func (r Router) Subscribe(evnt Event, subsc SubscribeFunc)
type SubscribeServer ¶
type SubscribeServer struct {
// contains filtered or unexported fields
}
func NewSubscribeServer ¶
func NewSubscribeServer() SubscribeServer
func (*SubscribeServer) Mount ¶
func (s *SubscribeServer) Mount(subsc Subscriber)
func (SubscribeServer) Serve ¶
func (s SubscribeServer) Serve(ctx context.Context)
func (SubscribeServer) Shutdown ¶
func (s SubscribeServer) Shutdown(ctx context.Context)
type Subscriber ¶
type Subscriber struct { MessageBus MessageBus Router Router AppLog applog.AppLog }
func NewSubscriber ¶
func NewSubscriber(msgbs MessageBus, algr applog.AppLog) Subscriber
func (Subscriber) Do ¶
func (s Subscriber) Do( ctx context.Context, done chan interface{}, wg *sync.WaitGroup, )
func (Subscriber) Mount ¶
func (s Subscriber) Mount(rtr Router)
func (Subscriber) Subscribe ¶
func (s Subscriber) Subscribe(evnt Event, subsc SubscribeFunc)
Click to show internal directories.
Click to hide internal directories.