subscriptions

package
v0.0.0-...-f374617 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 19, 2021 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

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 ConsumeMessages

func ConsumeMessages()

ConsumeMessages consume messages

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL