consumers

package
v0.0.0-...-9835270 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2021 License: AGPL-3.0, Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OutputRoomEventConsumer

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

OutputRoomEventConsumer consumes events that originated in the room server.

func NewOutputRoomEventConsumer

func NewOutputRoomEventConsumer(
	cfg *config.Dendrite,
	appserviceDB model.AppServiceDatabase,
	rsDB model.RoomServerDatabase,
	workerStates []types.ApplicationServiceWorkerState,
) *OutputRoomEventConsumer

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

func (*OutputRoomEventConsumer) OnMessage

func (c *OutputRoomEventConsumer) OnMessage(ctx context.Context, topic string, partition int32, data []byte, rawMsg interface{})

onMessage 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.

func (*OutputRoomEventConsumer) Start

func (c *OutputRoomEventConsumer) Start() error

Start consuming from room servers

Jump to

Keyboard shortcuts

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