Sovite.Core.Repo.Tables.GreylistEntries (sovite v0.6.0)

Copy Markdown View Source

The greylisting triplets seen by Sovite.Core.Greylist: one per client network, sender, and recipient.

Summary

Functions

How many entries there are, and how many of them passed.

Deletes every entry. Returns how many.

Deletes the entries that expired before now. Returns how many.

The entry with key triplet, if any.

The entries, most recently seen first.

Merges an entry from another node (see Sovite.Core.Cluster.Sync): stored if new, otherwise combined with the stored one, keeping the earliest first sighting and pass, and the latest use and expiry.

Stores the entry of attrs.triplet, replacing an earlier one.

Functions

counts(repo)

@spec counts(Sovite.Core.Repo.t()) :: %{
  total: non_neg_integer(),
  passed: non_neg_integer()
}

How many entries there are, and how many of them passed.

delete_all(repo)

@spec delete_all(Sovite.Core.Repo.t()) :: non_neg_integer()

Deletes every entry. Returns how many.

delete_expired(repo, now)

@spec delete_expired(Sovite.Core.Repo.t(), DateTime.t()) :: non_neg_integer()

Deletes the entries that expired before now. Returns how many.

get(repo, triplet)

The entry with key triplet, if any.

list(repo)

The entries, most recently seen first.

merge(repo, attrs)

Merges an entry from another node (see Sovite.Core.Cluster.Sync): stored if new, otherwise combined with the stored one, keeping the earliest first sighting and pass, and the latest use and expiry.

put(repo, attrs)

Stores the entry of attrs.triplet, replacing an earlier one.