Versions in this module Expand all Collapse all v0 v0.1.0 Aug 4, 2025 Changes in this version + func GenerateAgentID() string + func GenerateMessageID() string + func GenerateQueueID(name string) string + type Client struct + CreatedAt time.Time + ID string + LastSeen time.Time + Metadata map[string]string + func NewClient(id string) *Client + func (c *Client) GetMetadata(key string) (string, bool) + func (c *Client) IsActive(timeout time.Duration) bool + func (c *Client) SetMetadata(key, value string) + func (c *Client) UpdateActivity() + type Message struct + CompletedAt *time.Time + CreatedAt time.Time + Error string + ExpiresAt *time.Time + From string + ID string + MaxRetries int + Metadata map[string]string + Payload []byte + Priority int + ProcessedAt *time.Time + RetryCount int + Status MessageStatus + TTL time.Duration + To string + Topic string + Type MessageType + func NewDirectMessage(from, to string, payload []byte) *Message + func NewTaskMessage(from, topic string, payload []byte) *Message + func (m *Message) CanRetry() bool + func (m *Message) IncrementRetry() + func (m *Message) IsExpired() bool + func (m *Message) SetCompleted() + func (m *Message) SetFailed(err string) + func (m *Message) SetProcessing() + type MessageStatus int + const MessageStatusCompleted + const MessageStatusDead + const MessageStatusExpired + const MessageStatusFailed + const MessageStatusPending + const MessageStatusProcessing + func (s MessageStatus) String() string + type MessageType int + const MessageTypeDirect + const MessageTypeTask + func (t MessageType) String() string + type Queue struct + Created time.Time + MessageCount int64 + Name string + Settings QueueSettings + Subscribers []string + TotalDequeued int64 + TotalEnqueued int64 + TotalFailed int64 + Type QueueType + func NewDeadLetterQueue() *Queue + func NewDirectQueue(clientID string) *Queue + func NewQueue(name string, queueType QueueType) *Queue + func NewTaskQueue(topic string) *Queue + func (q *Queue) AddSubscriber(clientID string) + func (q *Queue) HasSubscriber(clientID string) bool + func (q *Queue) IncrementDequeued() + func (q *Queue) IncrementEnqueued() + func (q *Queue) IncrementFailed() + func (q *Queue) IsFull() bool + func (q *Queue) RemoveSubscriber(clientID string) + type QueueSettings struct + BatchSize int + DefaultTTL time.Duration + EnablePriority bool + MaxMessageSize int + MaxSize int + RetentionPeriod time.Duration + func DefaultQueueSettings() QueueSettings + type QueueStats struct + AverageWait time.Duration + DequeueRate float64 + EnqueueRate float64 + ErrorRate float64 + MessageCount int64 + Name string + Subscribers int + Type QueueType + type QueueType int + const QueueTypeDead + const QueueTypeDirect + const QueueTypeTask + func (t QueueType) String() string + type Response struct + Data interface{} + Message string + Success bool + type Subscription struct + ClientID string + SubscribedAt time.Time + Topic string + func NewSubscription(clientID, topic string) *Subscription