Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseChannel ¶
type BaseChannel struct {
Bus *bus.MessageBus
AllowList map[string]bool
}
BaseChannel provides common functionality
func (*BaseChannel) IsAllowed ¶
func (b *BaseChannel) IsAllowed(senderID string) bool
IsAllowed checks if sender is permitted
func (*BaseChannel) PublishInbound ¶
func (b *BaseChannel) PublishInbound(msg *bus.InboundMessage)
PublishInbound sends message to bus
type Channel ¶
type Channel interface {
Name() string
Start(ctx context.Context) error
Stop(ctx context.Context) error
Send(ctx context.Context, msg *bus.OutboundMessage) error
IsAllowed(senderID string) bool
}
Channel interface for chat platforms
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager coordinates all channels
func NewManager ¶
func NewManager(msgBus *bus.MessageBus) *Manager
NewManager creates a channel manager
func (*Manager) RouteOutbound ¶
RouteOutbound sends outbound messages to appropriate channels
Click to show internal directories.
Click to hide internal directories.