Documentation
¶
Index ¶
- Variables
- func ConsumeMessages()
- func GetSubscribedEvents(w http.ResponseWriter, r *http.Request)
- func NotifySubscriptionMessageToApp(message []byte)
- func SubscribeEvents(w http.ResponseWriter, r *http.Request)
- func UnsubscribeEvents(w http.ResponseWriter, r *http.Request)
- func UpdateSubscribedEvents(w http.ResponseWriter, r *http.Request)
- type Subscribe
- type SubscribeResponse
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Subscriptions = make(map[string]*Subscribe) //StartConsume to start message conumption StartConsume bool )
View Source
var (
KafkaSubscriptions []string
)
KafkaSubscriptions subscription lists
Functions ¶
func GetSubscribedEvents ¶
func GetSubscribedEvents(w http.ResponseWriter, r *http.Request)
GetSubscribedEvents gets list of events subscribed
func NotifySubscriptionMessageToApp ¶
func NotifySubscriptionMessageToApp(message []byte)
NotifySubscriptionMessageToApp send messages to app
func SubscribeEvents ¶
func SubscribeEvents(w http.ResponseWriter, r *http.Request)
SubscribeEvents gets list of events to subscribe
func UnsubscribeEvents ¶
func UnsubscribeEvents(w http.ResponseWriter, r *http.Request)
UnsubscribeEvents delete list of events subscribed
func UpdateSubscribedEvents ¶
func UpdateSubscribedEvents(w http.ResponseWriter, r *http.Request)
UpdateSubscribedEvents update the subscribed event lists
Types ¶
type Subscribe ¶
type Subscribe struct { LocalEventName []string `json:"localEventName"` NfNamingCode []string `json:"nfNamingCode,omitempty"` NfcNamingCode []string `json:"nfcNamingCode,omitempty"` LocalNfID []string `json:"localNfId,omitempty"` }
Subscribe struct for event subscription
type SubscribeResponse ¶
type SubscribeResponse struct { SubscriptionID string `json:"subscriptionId,omitempty"` ErrorReason string `json:"error,omitempty"` }
SubscribeResponse
Click to show internal directories.
Click to hide internal directories.