push

package
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 21, 2024 License: MIT Imports: 7 Imported by: 3

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) Close

func (e *EventSource) Close()

Closes the 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()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL