nidus-sync/platform/event.go
Eli Ribble 8387cf667b
Add company filter to Lob list addresses
...even though I never made it actually work.
2026-04-20 22:33:20 +00:00

32 lines
708 B
Go

package platform
import (
"time"
"github.com/Gleipnir-Technology/nidus-sync/config"
"github.com/Gleipnir-Technology/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,
})
}