raketka-1.1.3: distributed-process node

Safe HaskellNone
LanguageHaskell2010

Control.Distributed.Raketka.Type.Server

Synopsis

Documentation

type Content tag ps s c = (PeerInfo ps, Specific tag ps s c, Serializable c, Show c) Source #

constraint type

c is Message content type, implementation-specific

class Specific tag ps s c | tag -> ps, tag -> s, tag -> c where Source #

methods in this instance are called in library, defined in the program (this or another program that consumes this library)

see example implementation in Control.Distributed.Raketka.Impl.Inst

Control.Distributed.Raketka.Impl.Inst is part of the package, is not displayed in docs because it is part of a program, not the library.

see also Main.hs there is important code there

c is Message content type, implementation-specific

Methods

startServer :: Tagged tag ServerId -> s -> Process () Source #

handleMessage :: Tagged tag (Server ps s) -> c -> Process () Source #

onPeerConnected :: Tagged tag (Server ps s) -> ProcessId -> Process () Source #

onPeerDisConnected :: Tagged tag (Server ps s) -> ProcessId -> Process () Source #

class PeerInfo ps where Source #

Minimal complete definition

onPeerConnected', onPeerDisConnected', peer_pids

Methods

onPeerConnected' :: ps -> ProcessId -> ps Source #

onPeerDisConnected' :: ps -> ProcessId -> ps Source #

peer_pids :: ps -> [ProcessId] Source #

Instances
PeerInfo (Set ProcessId) Source # 
Instance details

Defined in Control.Distributed.Raketka.Type.Server

Methods

onPeerConnected' :: Set ProcessId -> ProcessId -> Set ProcessId Source #

onPeerDisConnected' :: Set ProcessId -> ProcessId -> Set ProcessId Source #

peer_pids :: Set ProcessId -> [ProcessId] Source #

passTag :: Tagged a b -> c -> Tagged a c Source #

pass tag between different types

data Server ps s Source #

Constructors

Server 

Fields

la :: STM a -> Process a Source #