mirror of
https://github.com/bitechdev/ResolveSpec.git
synced 2026-01-20 17:44:26 +00:00
feature: mqtt support
This commit is contained in:
21
pkg/mqttspec/subscription.go
Normal file
21
pkg/mqttspec/subscription.go
Normal file
@@ -0,0 +1,21 @@
|
||||
package mqttspec
|
||||
|
||||
import (
|
||||
"github.com/bitechdev/ResolveSpec/pkg/websocketspec"
|
||||
)
|
||||
|
||||
// Subscription types - aliases to websocketspec for subscription management
|
||||
type (
|
||||
// Subscription represents an active subscription to entity changes
|
||||
// The key difference for MQTT: notifications are delivered via MQTT publish
|
||||
// to spec/{client_id}/notify/{subscription_id} instead of WebSocket send
|
||||
Subscription = websocketspec.Subscription
|
||||
|
||||
// SubscriptionManager manages all active subscriptions
|
||||
SubscriptionManager = websocketspec.SubscriptionManager
|
||||
)
|
||||
|
||||
// NewSubscriptionManager creates a new subscription manager
|
||||
func NewSubscriptionManager() *SubscriptionManager {
|
||||
return websocketspec.NewSubscriptionManager()
|
||||
}
|
||||
Reference in New Issue
Block a user