bus

package
v0.2.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 18, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bus

type Bus struct {
	// contains filtered or unexported fields
}

func New

func New(buffer int) *Bus

func (*Bus) ConsumeInbound

func (b *Bus) ConsumeInbound(ctx context.Context) (InboundMessage, error)

func (*Bus) ConsumeOutbound

func (b *Bus) ConsumeOutbound(ctx context.Context) (OutboundMessage, error)

func (*Bus) PublishInbound

func (b *Bus) PublishInbound(ctx context.Context, msg InboundMessage) error

func (*Bus) PublishOutbound

func (b *Bus) PublishOutbound(ctx context.Context, msg OutboundMessage) error

type Delivery added in v0.2.2

type Delivery struct {
	MessageID string
	ReplyToID string
	ThreadID  string
	IsDirect  bool
}

type InboundMessage

type InboundMessage struct {
	Channel    string
	SenderID   string
	ChatID     string
	Content    string
	SessionKey string // usually "channel:chat_id"
	Delivery   Delivery
}

type OutboundMessage

type OutboundMessage struct {
	Channel  string
	ChatID   string
	Content  string
	ReplyTo  string
	Delivery Delivery
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL