nidus-sync/platform/event.go
Eli Ribble 7237f5f666
Some checks failed
/ golint (push) Failing after 3m50s
Move internal references to new source hosting
2026-05-19 15:33:57 +00:00

32 lines
718 B
Go

package platform
import (
"time"
"source.gleipnir.technology/Gleipnir/nidus-sync/config"
"source.gleipnir.technology/Gleipnir/nidus-sync/platform/event"
)
type Envelope = event.Envelope
type Event = event.Event
const EventTypeHeartbeat = event.EventTypeHeartbeat
func EventShutdown() {
event.Shutdown()
}
func SetEventChannel(chan_events chan<- Envelope) {
event.SetEventChannel(chan_events)
}
func SudoEvent(org_id int32, resource, type_, uri_path string) {
event_type := event.EventTypeFromString(type_)
go event.Send(event.Envelope{
Event: Event{
Resource: resource,
Time: time.Now(),
Type: event_type,
URI: config.MakeURLNidus(uri_path),
},
OrganizationID: org_id,
})
}