Close old SSE connections, push down type strings

This commit is contained in:
Eli Ribble 2026-03-13 18:21:20 +00:00
parent e8d865d0ab
commit 4925fe4857
No known key found for this signature in database
4 changed files with 42 additions and 4 deletions

View file

@ -1,8 +1,9 @@
package event
import (
"github.com/Gleipnir-Technology/nidus-sync/config"
"time"
"github.com/Gleipnir-Technology/nidus-sync/config"
)
var chanEvents chan<- Envelope
@ -27,11 +28,27 @@ type EventType int
const (
EventTypeCreated EventType = iota
EventTypeDeleted
EventTypeModified
EventTypeHeartbeat
EventTypeSudo
EventTypeUpdated
)
func (et EventType) String() string {
switch et {
case EventTypeCreated:
return "created"
case EventTypeDeleted:
return "deleted"
case EventTypeHeartbeat:
return "heartbeat"
case EventTypeSudo:
return "sudo"
case EventTypeUpdated:
return "updated"
}
return "unknown"
}
type ResourceType int
const (