unified gateway interface
This commit is contained in:
31
api/pkg/discovery/events.go
Normal file
31
api/pkg/discovery/events.go
Normal file
@@ -0,0 +1,31 @@
|
||||
package discovery
|
||||
|
||||
import (
|
||||
"github.com/tech/sendico/pkg/model"
|
||||
nm "github.com/tech/sendico/pkg/model/notification"
|
||||
"github.com/tech/sendico/pkg/mservice"
|
||||
)
|
||||
|
||||
func ServiceAnnounceEvent() model.NotificationEvent {
|
||||
return model.NewNotification(mservice.Discovery, nm.NADiscoveryServiceAnnounce)
|
||||
}
|
||||
|
||||
func GatewayAnnounceEvent() model.NotificationEvent {
|
||||
return model.NewNotification(mservice.Discovery, nm.NADiscoveryGatewayAnnounce)
|
||||
}
|
||||
|
||||
func HeartbeatEvent() model.NotificationEvent {
|
||||
return model.NewNotification(mservice.Discovery, nm.NADiscoveryHeartbeat)
|
||||
}
|
||||
|
||||
func LookupRequestEvent() model.NotificationEvent {
|
||||
return model.NewNotification(mservice.Discovery, nm.NADiscoveryLookupRequest)
|
||||
}
|
||||
|
||||
func LookupResponseEvent() model.NotificationEvent {
|
||||
return model.NewNotification(mservice.Discovery, nm.NADiscoveryLookupResponse)
|
||||
}
|
||||
|
||||
func RefreshUIEvent() model.NotificationEvent {
|
||||
return model.NewNotification(mservice.Discovery, nm.NADiscoveryRefreshUI)
|
||||
}
|
||||
Reference in New Issue
Block a user