consumers

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2025 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewOutputClientDataConsumer

func NewOutputClientDataConsumer(
	ctx context.Context,
	cfg *config.SyncAPI,
	qm queueutil.QueueManager,
	store storage.Database,
	notifier *notifier.Notifier,
	stream streams.StreamProvider,
) error

NewOutputClientDataConsumer creates a new OutputClientData consumer. Call Start() to begin consuming from room servers.

func NewOutputKeyChangeEventConsumer

func NewOutputKeyChangeEventConsumer(
	ctx context.Context,
	cfg *config.SyncAPI,
	qm queueutil.QueueManager,
	rsAPI roomserverAPI.SyncRoomserverAPI,
	store storage.Database,
	notifier *notifier.Notifier,
	stream streams.StreamProvider,
) error

NewOutputKeyChangeEventConsumer creates a new OutputKeyChangeEventConsumer. Call Start() to begin consuming from the key server.

func NewOutputNotificationDataConsumer

func NewOutputNotificationDataConsumer(
	ctx context.Context,
	cfg *config.SyncAPI,
	qm queueutil.QueueManager,
	store storage.Database,
	notifier *notifier.Notifier,
	stream streams.StreamProvider,
) error

NewOutputNotificationDataConsumer creates a new consumer. Call Start() to begin consuming.

func NewOutputReceiptEventConsumer

func NewOutputReceiptEventConsumer(
	ctx context.Context,
	cfg *config.SyncAPI,
	qm queueutil.QueueManager,
	store storage.Database,
	notifier *notifier.Notifier,
	stream streams.StreamProvider,
) error

NewOutputReceiptEventConsumer creates a new OutputReceiptEventConsumer. Call Start() to begin consuming from the EDU server.

func NewOutputRoomEventConsumer

func NewOutputRoomEventConsumer(
	ctx context.Context,
	cfg *config.SyncAPI,
	qm queueutil.QueueManager,
	am actorutil.ActorManager,
	store storage.Database,
	notifier *notifier.Notifier,
	pduStream streams.StreamProvider,
	inviteStream streams.StreamProvider,
	rsAPI api.SyncRoomserverAPI,
	asProducer *producers.AppserviceEventProducer,
) error

NewOutputRoomEventConsumer creates a new OutputRoomEventConsumer. Call Start() to begin consuming from room servers.

func NewOutputSendToDeviceEventConsumer

func NewOutputSendToDeviceEventConsumer(
	ctx context.Context,
	cfg *config.SyncAPI,
	qm queueutil.QueueManager,
	store storage.Database,
	am actorutil.ActorManager,

	userAPI api.SyncKeyAPI,
	notifier *notifier.Notifier,
	stream streams.StreamProvider,
) error

NewOutputSendToDeviceEventConsumer creates a new OutputSendToDeviceEventConsumer. Call Start() to begin consuming from the EDU server.

func NewOutputTypingEventConsumer

func NewOutputTypingEventConsumer(
	ctx context.Context,
	cfg *config.SyncAPI,
	qm queueutil.QueueManager,
	eduCache *cacheutil.EDUCache,
	notifier *notifier.Notifier,
	stream streams.StreamProvider,
) error

NewOutputTypingEventConsumer creates a new OutputTypingEventConsumer. Call Start() to begin consuming from the EDU server.

Types

type OutputClientDataConsumer

type OutputClientDataConsumer struct {
	// contains filtered or unexported fields
}

OutputClientDataConsumer consumes events that originated in the client API server.

func (*OutputClientDataConsumer) Handle added in v0.6.21

func (s *OutputClientDataConsumer) Handle(ctx context.Context, metadata map[string]string, message []byte) error

Handle is called when the sync server receives a new event from the client API server output log. It is not safe for this function to be called from multiple goroutines, or else the sync stream position may race and be incorrectly calculated.

type OutputKeyChangeEventConsumer

type OutputKeyChangeEventConsumer struct {
	// contains filtered or unexported fields
}

OutputKeyChangeEventConsumer consumes events that originated in the key server.

func (*OutputKeyChangeEventConsumer) Handle added in v0.6.21

func (s *OutputKeyChangeEventConsumer) Handle(ctx context.Context, metadata map[string]string, message []byte) error

type OutputNotificationDataConsumer

type OutputNotificationDataConsumer struct {
	// contains filtered or unexported fields
}

OutputNotificationDataConsumer consumes events that originated in the Push server.

func (*OutputNotificationDataConsumer) Handle added in v0.6.21

func (s *OutputNotificationDataConsumer) Handle(ctx context.Context, metadata map[string]string, message []byte) error

Handle is called when the Sync server receives a new event from the push server. It is not safe for this function to be called from multiple goroutines, or else the sync stream position may race and be incorrectly calculated.

type OutputReceiptEventConsumer

type OutputReceiptEventConsumer struct {
	// contains filtered or unexported fields
}

OutputReceiptEventConsumer consumes events that originated in the EDU server.

func (*OutputReceiptEventConsumer) Handle added in v0.6.21

func (s *OutputReceiptEventConsumer) Handle(ctx context.Context, metadata map[string]string, message []byte) error

type OutputRoomEventConsumer

type OutputRoomEventConsumer struct {
	// contains filtered or unexported fields
}

OutputRoomEventConsumer consumes events that originated in the room server.

func (*OutputRoomEventConsumer) Handle added in v0.6.21

func (s *OutputRoomEventConsumer) Handle(ctx context.Context, metadata map[string]string, _ []byte) error

func (*OutputRoomEventConsumer) HandleRoomEvent added in v0.6.21

func (s *OutputRoomEventConsumer) HandleRoomEvent(ctx context.Context, metadata map[string]string, message []byte) error

HandleRoomEvent is called when the sync server receives a new event from the room server output log. It is not safe for this function to be called from multiple goroutines, or else the sync stream position may race and be incorrectly calculated.

type OutputSendToDeviceEventConsumer

type OutputSendToDeviceEventConsumer struct {
	// contains filtered or unexported fields
}

OutputSendToDeviceEventConsumer consumes events that originated in the EDU server.

func (*OutputSendToDeviceEventConsumer) Handle added in v0.6.21

func (s *OutputSendToDeviceEventConsumer) Handle(ctx context.Context, metadata map[string]string, _ []byte) error

func (*OutputSendToDeviceEventConsumer) HandleUserEvent added in v0.6.21

func (s *OutputSendToDeviceEventConsumer) HandleUserEvent(ctx context.Context, metadata map[string]string, message []byte) error

type OutputTypingEventConsumer

type OutputTypingEventConsumer struct {
	// contains filtered or unexported fields
}

OutputTypingEventConsumer consumes events that originated in the EDU server.

func (*OutputTypingEventConsumer) Handle added in v0.6.21

func (s *OutputTypingEventConsumer) Handle(ctx context.Context, metadata map[string]string, message []byte) error

type PresenceConsumer

type PresenceConsumer struct {
	// contains filtered or unexported fields
}

PresenceConsumer consumes presence events that originated in the EDU server.

func NewPresenceConsumer

func NewPresenceConsumer(
	ctx context.Context,
	cfg *config.SyncAPI,
	qm queueutil.QueueManager,
	db storage.Database,
	notifier *notifier.Notifier,
	stream streams.StreamProvider,
	deviceAPI api.SyncUserAPI,
) (*PresenceConsumer, error)

NewPresenceConsumer creates a new PresenceConsumer. Call Start() to begin consuming events.

func (*PresenceConsumer) EmitPresence

func (s *PresenceConsumer) EmitPresence(ctx context.Context, userID string, presence types.Presence, statusMsg *string, ts spec.Timestamp, fromSync bool)

func (*PresenceConsumer) Handle added in v0.6.21

func (s *PresenceConsumer) Handle(ctx context.Context, metadata map[string]string, message []byte) error

Jump to

Keyboard shortcuts

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