Skip to content

Commit 9c85c9e

Browse files
authored
Merge branch 'develop' into dependabot/go_modules/develop/github.com/fsnotify/fsnotify-1.10.0
2 parents e6aa78b + ca15827 commit 9c85c9e

114 files changed

Lines changed: 6719 additions & 632 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

acceptance/petstore/asyncapi.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ servers:
66
broker:
77
url: 127.0.0.1:19092
88
protocol: kafka
9+
mqtt:
10+
url: 127.0.0.1:11883
11+
protocol: mqtt
912
channels:
1013
petstore.order-event:
1114
subscribe:

api/handler.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ var (
5656
ServiceKafka serviceType = "kafka"
5757
ServiceMail serviceType = "mail"
5858
ServiceLdap serviceType = "ldap"
59+
ServiceMqtt serviceType = "mqtt"
5960
)
6061

6162
type service struct {
@@ -138,6 +139,8 @@ func (h *handler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
138139
h.getHttpService(w, r, h.app.Monitor)
139140
case strings.HasPrefix(p, "/api/services/kafka"):
140141
h.handleKafka(w, r)
142+
case strings.HasPrefix(p, "/api/services/mqtt"):
143+
h.handleMqtt(w, r)
141144
case strings.HasPrefix(p, "/api/services/mail/"):
142145
h.handleMailService(w, r)
143146
case strings.HasPrefix(p, "/api/services/ldap/"):
@@ -204,6 +207,7 @@ func (h *handler) getServices(w http.ResponseWriter, _ *http.Request) {
204207
services = append(services, getKafkaServices(h.app.Kafka, h.app.Monitor)...)
205208
services = append(services, getMailServices(h.app.Mail, h.app.Monitor)...)
206209
services = append(services, getLdapServices(h.app.Ldap, h.app.Monitor)...)
210+
services = append(services, getMqttServices(h.app.Mqtt, h.app.Monitor)...)
207211
slices.SortFunc(services, func(a interface{}, b interface{}) int {
208212
return compareService(a, b)
209213
})
@@ -242,6 +246,9 @@ func (h *handler) getInfo(w http.ResponseWriter, _ *http.Request) {
242246
if len(h.app.Ldap.List()) > 0 {
243247
i.ActiveServices = append(i.ActiveServices, "ldap")
244248
}
249+
if len(h.app.Mqtt.List()) > 0 {
250+
i.ActiveServices = append(i.ActiveServices, "mqtt")
251+
}
245252

246253
writeJsonBody(w, i)
247254
}

0 commit comments

Comments
 (0)