Documentation ¶
Index ¶
- type Handler
- func (h *Handler) Accumulate(ctx context.Context, userID, deviceID, roomID string, ...) error
- func (h *Handler) AddToDeviceMessages(ctx context.Context, userID, deviceID string, msgs []json.RawMessage) error
- func (h *Handler) EnsurePolling(p *pubsub.V3EnsurePolling)
- func (h *Handler) ExpireOldPollers()
- func (h *Handler) Initialise(ctx context.Context, roomID string, state []json.RawMessage) error
- func (h *Handler) Listen()
- func (h *Handler) OnAccountData(ctx context.Context, userID, roomID string, events []json.RawMessage) error
- func (h *Handler) OnBulkDeviceDataUpdate(payload *pubsub.V2DeviceData)
- func (h *Handler) OnE2EEData(ctx context.Context, userID, deviceID string, otkCounts map[string]int, ...) (retErr error)
- func (h *Handler) OnExpiredToken(ctx context.Context, accessTokenHash, userID, deviceID string)
- func (h *Handler) OnInvite(ctx context.Context, userID, roomID string, inviteState []json.RawMessage) error
- func (h *Handler) OnLeftRoom(ctx context.Context, userID, roomID string, leaveEv json.RawMessage) error
- func (h *Handler) OnReceipt(ctx context.Context, userID, roomID, ephEventType string, ...)
- func (h *Handler) OnTerminated(ctx context.Context, pollerID sync2.PollerID)
- func (h *Handler) SetTyping(ctx context.Context, pollerID sync2.PollerID, roomID string, ...)
- func (h *Handler) StartV2Pollers()
- func (h *Handler) Teardown()
- func (h *Handler) UpdateDeviceSince(ctx context.Context, userID, deviceID, since string)
- func (h *Handler) UpdateUnreadCounts(ctx context.Context, roomID, userID string, highlightCount, notifCount *int)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler struct { Store *state.Storage PendingTxnIDs *sync2.PendingTransactionIDs // contains filtered or unexported fields }
Handler is responsible for starting v2 pollers at startup; processing v2 data (as a sync2.V2DataReceiver) and publishing updates (pubsub.Payload to V2Listeners); and receiving and processing EnsurePolling events.
func NewHandler ¶
func (*Handler) Accumulate ¶
func (*Handler) AddToDeviceMessages ¶
func (*Handler) EnsurePolling ¶
func (h *Handler) EnsurePolling(p *pubsub.V3EnsurePolling)
func (*Handler) ExpireOldPollers ¶ added in v0.99.6
func (h *Handler) ExpireOldPollers()
ExpireOldPollers looks for pollers whose devices have not made a sliding sync query in the last 30 days, and asks the poller map to expire their corresponding pollers. This function does not normally need to be called manually (StartV2Pollers queues it up to run hourly); we expose it publicly only for testing purposes.
func (*Handler) Initialise ¶
func (*Handler) OnAccountData ¶
func (*Handler) OnBulkDeviceDataUpdate ¶ added in v0.99.4
func (h *Handler) OnBulkDeviceDataUpdate(payload *pubsub.V2DeviceData)
Called periodically by deviceDataTicker, contains many updates
func (*Handler) OnE2EEData ¶
func (*Handler) OnExpiredToken ¶ added in v0.99.2
func (*Handler) OnLeftRoom ¶
func (*Handler) OnTerminated ¶
func (*Handler) StartV2Pollers ¶
func (h *Handler) StartV2Pollers()
func (*Handler) UpdateDeviceSince ¶
Emits nothing as no downstream components need it.