Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Notifier ¶
type Notifier struct {
// contains filtered or unexported fields
}
Notifier is an SSE-backed AsyncNotifier that manages direct client connections. Note that AcceptConnection blocks the calling goroutine for the lifetime of the client connection, as SSE uses the HTTP response writer directly.
func NewNotifier ¶
func NewNotifier(_ *Config, logger logging.Logger, tracerProvider tracing.TracerProvider) (*Notifier, error)
NewNotifier creates a new SSE-backed AsyncNotifier.
func (*Notifier) AcceptConnection ¶
func (n *Notifier) AcceptConnection(w http.ResponseWriter, r *http.Request, channel, memberID string) error
AcceptConnection upgrades the HTTP connection to an SSE stream and registers it under the given channel and memberID. This method blocks the calling goroutine for the lifetime of the client connection.
Click to show internal directories.
Click to hide internal directories.