Documentation ¶
Overview ¶
Package pubsub receives internal events.
Package pubsub receives internal events.
Package pubsub receives internal events.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NewPeerSubscriber ¶
type NewPeerSubscriber struct {
// contains filtered or unexported fields
}
func NewNewPeerSubscriber ¶
func NewNewPeerSubscriber( pubsub *pubsub.NewPeerPubSub, handler AcceptNewPeerCommandHandler, logger logging.Logger, ) *NewPeerSubscriber
type ProcessRoomAttendantEventHandler ¶
type ProcessRoomAttendantEventHandler interface {
Handle(ctx context.Context, cmd commands.ProcessRoomAttendantEvent) error
}
type RequestSubscriber ¶
type RequestSubscriber struct {
// contains filtered or unexported fields
}
RequestSubscriber receives internal events containing arriving RPC requests and passes them to the RPC mux.
This is done because while it makes perfect sense for the RPC mux to be a port our program creates new RPC connections (which are sources of RPC requests) not only in the ports layer but also in the application layer (when establishing new connections). This is different from common programs which only receive incoming connections which e.g. provide REST requests. Since both the fact that connections must exist in the application layer and the fact that the RPC mux is a port make sense then we need a mechanism such as pub sub to bridge the two parts of the program together as the application layer can't directly drive ports.
func NewRequestSubscriber ¶
func NewRequestSubscriber(pubsub *pubsub.RequestPubSub, mux *mux.Mux) *RequestSubscriber
type RoomAttendantEventSubscriber ¶
type RoomAttendantEventSubscriber struct {
// contains filtered or unexported fields
}
func NewRoomAttendantEventSubscriber ¶
func NewRoomAttendantEventSubscriber( pubsub *pubsub.RoomAttendantEventPubSub, handler ProcessRoomAttendantEventHandler, logger logging.Logger, ) *RoomAttendantEventSubscriber