Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Documentation
startServer :: ServerOptions -> Head LocalState -> (String -> IO ()) -> [SomeService] -> IO Server Source #
stopServer :: Server -> IO () Source #
serverIdentity :: Server -> IO UnifiedIdentity Source #
peerServer :: Peer -> Server Source #
peerStorage :: Peer -> Storage Source #
data PeerAddress Source #
Instances
Show PeerAddress Source # | |
Defined in Erebos.Network showsPrec :: Int -> PeerAddress -> ShowS # show :: PeerAddress -> String # showList :: [PeerAddress] -> ShowS # | |
Eq PeerAddress Source # | |
Defined in Erebos.Network (==) :: PeerAddress -> PeerAddress -> Bool # (/=) :: PeerAddress -> PeerAddress -> Bool # | |
Ord PeerAddress Source # | |
Defined in Erebos.Network compare :: PeerAddress -> PeerAddress -> Ordering # (<) :: PeerAddress -> PeerAddress -> Bool # (<=) :: PeerAddress -> PeerAddress -> Bool # (>) :: PeerAddress -> PeerAddress -> Bool # (>=) :: PeerAddress -> PeerAddress -> Bool # max :: PeerAddress -> PeerAddress -> PeerAddress # min :: PeerAddress -> PeerAddress -> PeerAddress # |
peerAddress :: Peer -> PeerAddress Source #
data PeerIdentity Source #
peerIdentity :: MonadIO m => Peer -> m PeerIdentity Source #
data WaitingRef Source #
wrDigest :: WaitingRef -> RefDigest Source #
class (Typeable s, Storable s, Typeable (ServiceState s), Typeable (ServiceGlobalState s)) => Service s where Source #
type ServiceAttributes s = attr | attr -> s Source #
type ServiceAttributes s = Proxy s
type ServiceState s :: Type Source #
type ServiceState s = ()
type ServiceGlobalState s :: Type Source #
type ServiceGlobalState s = ()
serviceID :: proxy s -> ServiceID Source #
serviceHandler :: Stored s -> ServiceHandler s () Source #
serviceNewPeer :: ServiceHandler s () Source #
defaultServiceAttributes :: proxy s -> ServiceAttributes s Source #
default defaultServiceAttributes :: ServiceAttributes s ~ Proxy s => proxy s -> ServiceAttributes s Source #
emptyServiceState :: proxy s -> ServiceState s Source #
default emptyServiceState :: ServiceState s ~ () => proxy s -> ServiceState s Source #
emptyServiceGlobalState :: proxy s -> ServiceGlobalState s Source #
default emptyServiceGlobalState :: ServiceGlobalState s ~ () => proxy s -> ServiceGlobalState s Source #
serviceStorageWatchers :: proxy s -> [SomeStorageWatcher s] Source #
Instances
sendToPeerWith :: forall s m. (Service s, MonadIO m, MonadError String m) => Peer -> (ServiceState s -> ExceptT String IO (Maybe s, ServiceState s)) -> m () Source #
runPeerService :: forall s m. (Service s, MonadIO m) => Peer -> ServiceHandler s () -> m () Source #