producers

package
v1.1.37 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2026 License: AGPL-3.0 Imports: 13 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SyncAPIProducer

type SyncAPIProducer struct {
	TopicReceiptEvent      string
	TopicSendToDeviceEvent string
	TopicTypingEvent       string
	TopicPresenceEvent     string
	TopicDeviceListUpdate  string
	TopicSigningKeyUpdate  string
	JetStream              nats.JetStreamContext
	Config                 *config.FederationAPI
	UserAPI                userapi.FederationUserAPI
}

SyncAPIProducer produces events for the sync API server to consume

func (*SyncAPIProducer) SendDeviceListUpdate

func (p *SyncAPIProducer) SendDeviceListUpdate(
	ctx context.Context, deviceListUpdate spec.RawJSON, origin spec.ServerName,
) (err error)

func (*SyncAPIProducer) SendPresence

func (p *SyncAPIProducer) SendPresence(
	ctx context.Context, userID string, presence types.Presence, statusMsg *string, lastActiveAgo int64,
) error

func (*SyncAPIProducer) SendReceipt

func (p *SyncAPIProducer) SendReceipt(
	ctx context.Context,
	userID, roomID, eventID, receiptType string, timestamp spec.Timestamp,
) error

func (*SyncAPIProducer) SendSigningKeyUpdate

func (p *SyncAPIProducer) SendSigningKeyUpdate(
	ctx context.Context, data spec.RawJSON, origin spec.ServerName,
) (err error)

func (*SyncAPIProducer) SendToDevice

func (p *SyncAPIProducer) SendToDevice(
	ctx context.Context, sender, userID, deviceID, eventType string,
	message json.RawMessage,
) error

func (*SyncAPIProducer) SendTyping

func (p *SyncAPIProducer) SendTyping(
	ctx context.Context, userID, roomID string, typing bool, timeoutMS int64,
) error

Jump to

Keyboard shortcuts

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