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 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
}
Click to show internal directories.
Click to hide internal directories.