queue

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Pool

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

func NewPool

func NewPool(config *PoolConfig, communityManager *community.Manager, storage storage.PersistentStorage) (*Pool, error)

func (*Pool) Submit

func (p *Pool) Submit(ctx context.Context, event gomatrixserverlib.PDU, mediaDownloader media.Downloader, waitCh chan<- *PoolResult) error

Submit asks the queue to perform filter checking on the given event. If `waitCh` is non-nil, it will be called with the result upon completion or error. The `waitCh` is not called if there was a submission error - that is instead returned from Submit.

type PoolConfig

type PoolConfig struct {
	ConcurrentPools int
	SizePerPool     int
}

type PoolResult

type PoolResult struct {
	// Nil if there was an error. Otherwise, contains filter results.
	Vectors confidence.Vectors

	// True when the event is considered spam. False indicates neutrality or not-spam.
	// False if there was an error.
	IsProbablySpam bool

	// The error processing the event, if any.
	Err error
}

Jump to

Keyboard shortcuts

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