Major integrations and fixes: - Added BACKBEAT SDK integration for P2P operation timing - Implemented beat-aware status tracking for distributed operations - Added Docker secrets support for secure license management - Resolved KACHING license validation via HTTPS/TLS - Updated docker-compose configuration for clean stack deployment - Disabled rollback policies to prevent deployment failures - Added license credential storage (CHORUS-DEV-MULTI-001) Technical improvements: - BACKBEAT P2P operation tracking with phase management - Enhanced configuration system with file-based secrets - Improved error handling for license validation - Clean separation of KACHING and CHORUS deployment stacks 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
38 lines
1.1 KiB
Go
38 lines
1.1 KiB
Go
package hmmm
|
|
|
|
import (
|
|
"context"
|
|
"chorus/pubsub"
|
|
)
|
|
|
|
// Message represents an HMMM message
|
|
type Message struct {
|
|
Topic string `json:"topic"`
|
|
Type string `json:"type"`
|
|
Payload map[string]interface{} `json:"payload"`
|
|
Version interface{} `json:"version"` // Can be string or int
|
|
IssueID int64 `json:"issue_id"`
|
|
ThreadID string `json:"thread_id"`
|
|
MsgID string `json:"msg_id"`
|
|
NodeID string `json:"node_id"`
|
|
HopCount int `json:"hop_count"`
|
|
Timestamp interface{} `json:"timestamp"`
|
|
Message string `json:"message"`
|
|
}
|
|
|
|
// Router provides HMMM routing functionality using the underlying pubsub system
|
|
type Router struct {
|
|
pubsub *pubsub.PubSub
|
|
}
|
|
|
|
// NewRouter creates a new HMMM router
|
|
func NewRouter(ps *pubsub.PubSub) *Router {
|
|
return &Router{
|
|
pubsub: ps,
|
|
}
|
|
}
|
|
|
|
// Publish publishes an HMMM message to the network
|
|
func (r *Router) Publish(ctx context.Context, msg Message) error {
|
|
return r.pubsub.PublishToDynamicTopic(msg.Topic, pubsub.MessageType(msg.Type), msg.Payload)
|
|
} |