Documentation
¶
Overview ¶
Package types provides core type definitions for the GoBroke message broker system.
Package types provides core type definitions for the GoBroke message broker system.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Logic ¶
type Logic interface {
// RunLogic processes a message and returns an error if processing fails.
RunLogic(Message) error
// Type returns the LogicType that determines how this handler processes messages.
Type() LogicType
// Name returns a unique identifier for this logic handler.
Name() string
}
Logic defines the interface that all logic handlers must implement. Logic handlers are responsible for processing messages within the GoBroke system.
type Message ¶
type Message struct {
// ToClient is a slice of client recipients for this message
ToClient []*clients.Client
// ToLogic is a slice of logic handlers that should process this message
ToLogic []Logic
// FromClient identifies the client that originated this message, if any
FromClient *clients.Client
// FromLogic identifies the logic handler that originated this message, if any
FromLogic Logic
// MessageRaw contains the raw message payload as bytes
MessageRaw []byte
// Metadata holds additional key-value pairs associated with the message
Metadata map[string]any
// UUID uniquely identifies this message instance
UUID string
}
Message represents a communication unit within the GoBroke system. It contains routing information, payload data, and metadata for message processing.
Click to show internal directories.
Click to hide internal directories.