Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EventSource ¶
type EventSource struct { // The JMAP client to use for the stream Client *jmap.Client // The function to pass state change events to Handler func(*jmap.StateChange) // The events to subscribe to. If left unset, will default to AllEvents Events []jmap.EventType // Interval the server should ping the client at, in seconds. The server // may choose to ignore this value. Set to 0 to disable pinging (which // the server may also ignore) Ping uint // Whether to close the connection after a state event CloseAfterState bool // contains filtered or unexported fields }
A subscription to an event stream
func (*EventSource) Listen ¶
func (e *EventSource) Listen() error
Starts listening for events from the source. Listen will block when called and return when the source has been disconnected or closed via a call to Close()
Click to show internal directories.
Click to hide internal directories.