| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
Ecluse.Core.Cve.Slot
Description
Advisory generations stay pinned for each lookup. Retirement belongs to the last reader, or to the swapper when no readers remain, even if the swapper is cancelled.
Synopsis
- data CveSlot
- newCveSlot :: IO CveSlot
- withSlotGeneration :: CveSlot -> (Maybe (DbEtag, CveLookup, AdvisorySource) -> IO a) -> IO a
- currentAdvisoryEtag :: CveSlot -> IO (Maybe DbEtag)
- data AdvisorySource = AdvisorySource {}
- currentAdvisorySource :: CveSlot -> IO (Maybe AdvisorySource)
- observeAdvisoryPublication :: CveSlot -> DbEtag -> Maybe UTCTime -> IO ()
- generationInstalledAt :: CveSlot -> IO (Maybe Double)
- swapIn :: CveSlot -> DbEtag -> Maybe UTCTime -> CveDb -> IO ()
Documentation
withSlotGeneration :: CveSlot -> (Maybe (DbEtag, CveLookup, AdvisorySource) -> IO a) -> IO a Source #
Borrow a generation's lookup, ETag and publication metadata until the action returns or is cancelled.
currentAdvisoryEtag :: CveSlot -> IO (Maybe DbEtag) Source #
Read the active ETag without pinning, or Nothing before the first sync.
data AdvisorySource Source #
The store's publication metadata. Republishing identical bytes can advance the timestamp.
Constructors
| AdvisorySource | |
Fields
| |
Instances
| Show AdvisorySource Source # | |
Defined in Ecluse.Core.Cve.Slot Methods showsPrec :: Int -> AdvisorySource -> ShowS # show :: AdvisorySource -> String # showList :: [AdvisorySource] -> ShowS # | |
| Eq AdvisorySource Source # | |
Defined in Ecluse.Core.Cve.Slot Methods (==) :: AdvisorySource -> AdvisorySource -> Bool # (/=) :: AdvisorySource -> AdvisorySource -> Bool # | |
currentAdvisorySource :: CveSlot -> IO (Maybe AdvisorySource) Source #
Read the active publication metadata, retained across failed polls, or Nothing before the first sync.
observeAdvisoryPublication :: CveSlot -> DbEtag -> Maybe UTCTime -> IO () Source #
Advance publication time only for the installed ETag, without replacing or retiring its database.