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: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func JoinedHostsFromEvents

func JoinedHostsFromEvents(ctx context.Context, evs []gomatrixserverlib.PDU, rsAPI api.FederationRoomserverAPI) ([]types.JoinedHost, error)

JoinedHostsFromEvents turns a list of state events into a list of joined hosts. This errors if one of the events was invalid. It should be impossible for an invalid event to get this far in the pipeline.

func NewKeyChangeConsumer

NewKeyChangeConsumer creates a new KeyChangeConsumer. Call Start() to begin consuming from key servers.

func NewOutputPresenceConsumer

func NewOutputPresenceConsumer(
	ctx context.Context,
	cfg *config.FederationAPI,
	qm queueutil.QueueManager,
	queues *queue.OutgoingQueues,
	store storage.Database,
	rsAPI roomserverAPI.FederationRoomserverAPI,
) error

NewOutputPresenceConsumer creates a new OutputPresenceConsumer. Call Start() to begin consuming events.

func NewOutputReceiptConsumer

func NewOutputReceiptConsumer(
	ctx context.Context,
	cfg *config.FederationAPI,
	qm queueutil.QueueManager,
	queues *queue.OutgoingQueues,
	store storage.Database,
) error

NewOutputReceiptConsumer creates a new OutputReceiptConsumer. Call Start() to begin consuming typing events.

func NewOutputRoomEventConsumer

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

func NewOutputSendToDeviceConsumer

func NewOutputSendToDeviceConsumer(
	ctx context.Context,
	cfg *config.FederationAPI,
	qm queueutil.QueueManager,
	queues *queue.OutgoingQueues,
	store storage.Database,
) error

NewOutputSendToDeviceConsumer creates a new OutputSendToDeviceConsumer. Call Start() to begin consuming send-to-device events.

func NewOutputTypingConsumer

func NewOutputTypingConsumer(
	ctx context.Context,
	cfg *config.FederationAPI,
	qm queueutil.QueueManager,
	queues *queue.OutgoingQueues,
	store storage.Database,
) error

NewOutputTypingConsumer creates a new OutputTypingConsumer. Call Start() to begin consuming typing events.

Types

type KeyChangeConsumer

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

KeyChangeConsumer consumes events that originate in key server.

func (*KeyChangeConsumer) Handle added in v0.6.21

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

Handle is called in response to a message received on the key change events topic from the key server.

type OutputPresenceConsumer

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

OutputPresenceConsumer consumes events that originate in the clientapi.

func (*OutputPresenceConsumer) Handle added in v0.6.21

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

Handle onMessage is called in response to a message received on the presence events topic from the client api.

type OutputReceiptConsumer

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

OutputReceiptConsumer consumes events that originate in the clientapi.

func (*OutputReceiptConsumer) Handle added in v0.6.21

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

Handle is called in response to a message received on the receipt events topic from the client api.

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 federation server receives a new event from the room server output log. It is unsafe to call this with messages for the same room in multiple gorountines because updates it will likely fail with a types.EventIDMismatchError when it realises that it cannot update the room state using the deltas.

type OutputSendToDeviceConsumer

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

OutputSendToDeviceConsumer consumes events that originate in the clientapi.

func (*OutputSendToDeviceConsumer) Handle added in v0.6.21

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

Handle is called in response to a message received on the send-to-device events topic from the client api.

type OutputTypingConsumer

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

OutputTypingConsumer consumes events that originate in the clientapi.

func (*OutputTypingConsumer) Handle added in v0.6.21

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

Handle is called in response to a message received on the typing events topic from the client api.

Jump to

Keyboard shortcuts

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