Documentation
¶
Overview ¶
Package bus decouples channels from the agent loop with bounded queues.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InboundMessage ¶
type InboundMessage struct {
Channel string
SenderID string
ChatID string
Content string
Time time.Time
}
func (InboundMessage) SessionKey ¶
func (m InboundMessage) SessionKey() string
SessionKey identifies the conversation a message belongs to.
type MessageBus ¶
type MessageBus struct {
// contains filtered or unexported fields
}
func New ¶
func New() *MessageBus
func (*MessageBus) Inbound ¶
func (b *MessageBus) Inbound() <-chan InboundMessage
func (*MessageBus) Outbound ¶
func (b *MessageBus) Outbound() <-chan OutboundMessage
func (*MessageBus) PublishInbound ¶
func (b *MessageBus) PublishInbound(msg InboundMessage) bool
PublishInbound enqueues without blocking; a full queue drops the message loudly rather than wedging a connector.
func (*MessageBus) PublishOutbound ¶
func (b *MessageBus) PublishOutbound(msg OutboundMessage) bool
type OutboundMessage ¶
Click to show internal directories.
Click to hide internal directories.