Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data EstablishedPeers peeraddr peerconn
- empty :: EstablishedPeers peeraddr perconn
- toMap :: EstablishedPeers peeraddr peerconn -> Map peeraddr peerconn
- toSet :: EstablishedPeers peeraddr peerconn -> Set peeraddr
- readyPeers :: Ord peeraddr => EstablishedPeers peeraddr peerconn -> Set peeraddr
- size :: EstablishedPeers peeraddr peerconn -> Int
- sizeReady :: EstablishedPeers peeraddr peerconn -> Int
- member :: Ord peeraddr => peeraddr -> EstablishedPeers peeraddr peerconn -> Bool
- insert :: Ord peeraddr => peeraddr -> peerconn -> EstablishedPeers peeraddr peerconn -> EstablishedPeers peeraddr peerconn
- delete :: Ord peeraddr => peeraddr -> EstablishedPeers peeraddr peerconn -> EstablishedPeers peeraddr peerconn
- deletePeers :: Ord peeraddr => Set peeraddr -> EstablishedPeers peeraddr peerconn -> EstablishedPeers peeraddr peerconn
- setCurrentTime :: Ord peeraddr => Time -> EstablishedPeers peeraddr peerconn -> EstablishedPeers peeraddr peerconn
- minActivateTime :: Ord peeraddr => EstablishedPeers peeraddr peerconn -> Maybe Time
- setActivateTime :: Ord peeraddr => Set peeraddr -> Time -> EstablishedPeers peeraddr peerconn -> EstablishedPeers peeraddr peerconn
- invariant :: Ord peeraddr => EstablishedPeers peeraddr peerconn -> Bool
Documentation
data EstablishedPeers peeraddr peerconn Source #
Instances
Functor ( EstablishedPeers peeraddr) Source # | |
Defined in Ouroboros.Network.PeerSelection.EstablishedPeers fmap :: (a -> b) -> EstablishedPeers peeraddr a -> EstablishedPeers peeraddr b Source # (<$) :: a -> EstablishedPeers peeraddr b -> EstablishedPeers peeraddr a Source # |
|
( Show peeraddr, Show peerconn) => Show ( EstablishedPeers peeraddr peerconn) Source # | |
|
empty :: EstablishedPeers peeraddr perconn Source #
toMap :: EstablishedPeers peeraddr peerconn -> Map peeraddr peerconn Source #
O(1)
toSet :: EstablishedPeers peeraddr peerconn -> Set peeraddr Source #
O(n)
readyPeers :: Ord peeraddr => EstablishedPeers peeraddr peerconn -> Set peeraddr Source #
Map of established peers that are either active or ready to be promoted to active.
O(n log m), for n not-ready peers, and m established peers
size :: EstablishedPeers peeraddr peerconn -> Int Source #
The number of established peers. The size of
allPeers
O(1)
sizeReady :: EstablishedPeers peeraddr peerconn -> Int Source #
The number of ready peers. The size of
readyPeers
O(1)
insert :: Ord peeraddr => peeraddr -> peerconn -> EstablishedPeers peeraddr peerconn -> EstablishedPeers peeraddr peerconn Source #
Insert a peer into
EstablishedPeers
.
delete :: Ord peeraddr => peeraddr -> EstablishedPeers peeraddr peerconn -> EstablishedPeers peeraddr peerconn Source #
deletePeers :: Ord peeraddr => Set peeraddr -> EstablishedPeers peeraddr peerconn -> EstablishedPeers peeraddr peerconn Source #
Bulk delete of peers from 'EstablishedPeers.
setCurrentTime :: Ord peeraddr => Time -> EstablishedPeers peeraddr peerconn -> EstablishedPeers peeraddr peerconn Source #
minActivateTime :: Ord peeraddr => EstablishedPeers peeraddr peerconn -> Maybe Time Source #
setActivateTime :: Ord peeraddr => Set peeraddr -> Time -> EstablishedPeers peeraddr peerconn -> EstablishedPeers peeraddr peerconn Source #