Documentation
¶
Overview ¶
Package sse provides Server-Sent Events support for real-time key change notifications.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthProvider ¶
type AuthProvider interface {
Enabled() bool
FilterKeysForRequest(r *http.Request, keys []string) []string
}
AuthProvider defines the interface for auth operations needed by SSE.
type Event ¶
type Event struct {
Key string `json:"key"`
Action enum.AuditAction `json:"action"`
Timestamp string `json:"timestamp"`
}
Event represents a key change event sent to subscribers.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service handles SSE subscriptions for key change events.
func (*Service) Publish ¶
func (s *Service) Publish(key string, action enum.AuditAction)
Publish sends a key change event to all matching subscribers. It publishes to the exact key topic and all prefix topics.
Click to show internal directories.
Click to hide internal directories.