Documentation ¶
Overview ¶
Package server implements a server-sent event API server.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Event ¶
type Event struct { Event string // Type of the event (i.e. "hearbeat", or you custom event type) Data []byte // Data field }
Event holds the event fields
type SSEServer ¶
type SSEServer struct {
// contains filtered or unexported fields
}
SSEServer holds the broker and implement the http.Handler interface
func (*SSEServer) Events ¶
Events returns the channel as send-only, that can be used to publish events
Click to show internal directories.
Click to hide internal directories.