queue

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, MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OutgoingQueues

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

OutgoingQueues is a collection of queues for sending transactions to other matrix servers

func NewOutgoingQueues

func NewOutgoingQueues(
	origin gomatrixserverlib.ServerName,
	fedClient *client.FedClientWrap,
	rpcCli roomserverapi.RoomserverRPCAPI,
	cfg *config.Fed,
	feddomains *common.FedDomains,
	rsRepo *repos.RoomServerCurStateRepo,
	recRepo *fedrepos.SendRecRepo,
	partitionProcessor PartitionProcessor,
) *OutgoingQueues

NewOutgoingQueues makes a new OutgoingQueues

func (*OutgoingQueues) Release

func (oqs *OutgoingQueues) Release(ctx context.Context, roomID, domain string)

func (*OutgoingQueues) RetrySend

func (oqs *OutgoingQueues) RetrySend(ctx context.Context, roomID, domain string)

func (*OutgoingQueues) SendEDU

func (oqs *OutgoingQueues) SendEDU(
	ctx context.Context,
	partition int32,
	e *gomatrixserverlib.EDU,
	domain string,
	roomID string,
) error

SendEDU sends an EDU event to the destinations

func (*OutgoingQueues) SendEvent

func (oqs *OutgoingQueues) SendEvent(
	ctx context.Context,
	partition int32,
	ev *gomatrixserverlib.Event,
	domain string,
	roomID string,
) error

SendEvent sends an event to the destinations

type PartitionProcessor

type PartitionProcessor interface {
	AssignRoomPartition(ctx context.Context, roomID, domain string, retryTime time.Duration, retryInterval time.Duration) (*fedrepos.RecordItem, bool)
	TryAssignRoomPartition(ctx context.Context, roomID, domain string) (*fedrepos.RecordItem, bool)
	UnassignRoomPartition(ctx context.Context, roomID, domain string)
	OnRoomDomainRelease(ctx context.Context, origin, roomID, domain string)
	HasAssgined(ctx context.Context, roomID, domain string) (*fedrepos.RecordItem, bool)
}

Jump to

Keyboard shortcuts

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