sync

package
v0.6.3 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2022 License: Apache-2.0 Imports: 22 Imported by: 8

Documentation

Index

Constants

View Source
const DefaultTimelineLimit = 20

Variables

This section is empty.

Functions

This section is empty.

Types

type RequestPool

type RequestPool struct {
	Notifier *notifier.Notifier
	// contains filtered or unexported fields
}

RequestPool manages HTTP long-poll connections for /sync

func NewRequestPool

NewRequestPool makes a new RequestPool

func (*RequestPool) OnIncomingKeyChangeRequest

func (rp *RequestPool) OnIncomingKeyChangeRequest(req *http.Request, device *userapi.Device) util.JSONResponse

func (*RequestPool) OnIncomingSyncRequest

func (rp *RequestPool) OnIncomingSyncRequest(req *http.Request, device *userapi.Device) util.JSONResponse

OnIncomingSyncRequest is called when a client makes a /sync request. This function MUST be called in a dedicated goroutine for this request. This function will block the goroutine until a response is ready, or it times out.

Jump to

Keyboard shortcuts

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